Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upbug in `tukey_hsd`: wrong grouping labels when `-` present #19
Comments
|
Internally, in the turkey_hsd() function, the following R code is used to separate comparisons into groups: separate(comparison, into= c("group2", "group1"), sep = "-") Consequently, If group levels contain special chars, such as "-", a wrong result is returned. A quick fix that appears in my mind is to systematically apply the function Any better suggestion? |
|
This is a super-hacky solution I have adopted in my workflow but I feel like there might be a smarter way to do this- I am not sure how |
|
With make.names(), all invalid characters are translated to "." Examples: make.names(c("a b", "a-b", "10", "a;b"))Output:
|
|
Hmm, that will solve the issue but, as a user, I will not be happy that the names were changed by the function. Rarely a good idea since people might want to rely on their names of choices downstream in a script where this function might be used. |
|
fixed now, thanks! |
The grouping levels here are
a-0andb-1, but that's not what is returned:Created on 2019-12-23 by the reprex package (v0.3.0)
Session info