Skip to content

Fix bug for multiple types in simpleFormUIFactory#6

Open
thothal wants to merge 1 commit intobeerda:masterfrom
thothal:bugfix_#5
Open

Fix bug for multiple types in simpleFormUIFactory#6
thothal wants to merge 1 commit intobeerda:masterfrom
thothal:bugfix_#5

Conversation

@thothal
Copy link

@thothal thothal commented Dec 1, 2022

attributeType assigns all classes of an object to the type slot. In the case of an ordered factor it stores thus factor and ordered. In simpleFormUIFactory we are testing for the type via ==. As of R 4.2.0 using conditions of length greater than 1 will throw an error (used to be a warning before). That is, if we have any object with severeal classes (for instance an ordered factor), the use of == will cause an error.

An easy fix is to replace == by %in% to make sure that the condition will always be of length one.

This closes #5.

`attributeType` assigns **all** classes of an object to the  `type`
slot. In the case of an ordered factor it stores thus `factor` **and**
`ordered`. In `simpleFormUIFactory` we are testing for the type via
`==´. As of `R 4.2.0` using conditions of length greater than 1 will
throw an error (used to be a warning before). That is, if we have any
object with severeal classes (for instance an  `ordered` factor),
the use of `==` will cause an error.

An easy fix is to replace `==` by `%in%` to make sure that the
condition will always be of length one.

This closes beerda#5.
Copy link

@Neo005 Neo005 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please release the updated version of the package for R 4.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Does not work with R version 4.2.2

2 participants