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

Better defensive programming to check column names in multiple_comparisons #53

Closed
rogerssam opened this issue Feb 23, 2023 · 0 comments
Closed
Assignees
Labels
bug Something isn't working fixed This issue has been resolved but not yet released

Comments

@rogerssam
Copy link
Contributor

rogerssam commented Feb 23, 2023

If a column name is provided that is too similar to the output columns, multiple_comparisons() will change the names of all the columns between the first and the maximum matching column to factors.

See example code below:

# Any of these names will break the function
c("predicted.value", "std.error", "Df",
  "groups", "PredictedValue", "ApproxSE", "ci", "low", "up")
library(biometryassist)
dat <- design("crd", LETTERS[1:4], 4, nrow = 4, ncols = 4)$design
names(dat)[5] <- "groups"
dat$response <- rnorm(16, 10)
dat.aov <- aov(response~groups, data = dat)
multiple_comparisons(dat.aov, classify = "groups", trans = "log", offset = 0)
@rogerssam rogerssam added the bug Something isn't working label Feb 23, 2023
@rogerssam rogerssam self-assigned this Feb 23, 2023
@rogerssam rogerssam added the fixed This issue has been resolved but not yet released label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed This issue has been resolved but not yet released
Projects
None yet
Development

No branches or pull requests

1 participant