Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Important bug in Rec #136

Closed
andresimi opened this issue Jul 2, 2020 · 2 comments
Closed

Important bug in Rec #136

andresimi opened this issue Jul 2, 2020 · 2 comments

Comments

@andresimi
Copy link

andresimi commented Jul 2, 2020

I think this is a bug.

library(sjmisc)

> rec(4, rec = "min:5=low; 6:10=high")
[1] "low"
> rec(4, rec = "min:5=low; 6:max=high")
[1] "high"
@andresimi
Copy link
Author

andresimi commented Jul 9, 2020

Hi, I noticed that something has changed but I am not understanding the rec behavior. Is something wrong with my code?

> library(sjmisc)
> rec(4, rec = "min:5=low; 6:10=high")
[1] "low"
> rec(4, rec = "min:5=low; 6:max=high")
Erro: ?Syntax error in recode range from 6 to 4.
> rec(4, rec = "min:5=low; max:6=high")
[1] "high"

@strengejacke
Copy link
Owner

Your highest number is 4, but you request a range from 6 to highest number. This is not possible, since the 6 is larger than the highest number, 4.

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

No branches or pull requests

2 participants