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

eyes - eye column not recognised if another column has _eye in their name #30

Closed
tjebo opened this issue Mar 8, 2021 · 1 comment
Closed

Comments

@tjebo
Copy link
Owner

tjebo commented Mar 8, 2021

library(eye)

id <- c(letters[sample(20)], letters[sample(20)])
foo <- data.frame(id, eyes = c("r", "l"))
foo$toldyou_eye <- "r"
eyes(foo)
#> Warning: Please define eye column
#> NULL

Created on 2021-03-08 by the reprex package (v1.0.0)

@tjebo
Copy link
Owner Author

tjebo commented Mar 8, 2021

This is currently by design, but not really very desired. eyes should give precedence to columns that are simply called "eyes" or "eye". Now you have to specify the eye column:

eyes(foo, eye = "eyes")
#> patients     eyes    right     left 
#>       20       28       14       14 

@tjebo tjebo changed the title eyes - eye column not recognised if one column has _eye in their name eyes - eye column not recognised if another column has _eye in their name Mar 8, 2021
tjebo added a commit that referenced this issue Mar 11, 2021
@tjebo tjebo closed this as completed Mar 11, 2021
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

1 participant