A bug happened!
When treatment group name is a substring of other group (eg "Treatment" , and "Treatment subgroup") or contain special characters (like + or () the following statement does not result in the desired contrast level selection.
sum_contrasts_level <- sum_contrasts[grepl(sum_level, sum_contrasts$contrast), ]
In the first situation (see anl2 in the below code), it will return a dataframe of 2 rows, rather than just 1.
In the latter (see anl3 in the below code), sum_contrasts_level will have 0 rows.
Error in format_value(rawvalues(x), format = format, output = output, :
cell <0.5917492876519231.97468593831888> and format xx.xx are of different length
anl3
Difference in Means in 3rd column is not displayed:
ARM C ARM A ARM B (x)
(N=132) (N=134) (N=134)
———————————————————————————————————————————————————————————
Unadjusted comparison
n 62 68 73
Mean 3.09 3.68 5.07
Difference in Means 0.59
95% CI (-3.73, 4.91)
p-value 0.7873
Code of Conduct
[X] I agree to follow this project's Code of Conduct.
Contribution Guidelines
[X] I agree to follow this project's Contribution Guidelines.
Security Policy
[X] I agree to follow this project's Security Policy.
What happened?
A bug happened! When treatment group name is a substring of other group (eg "Treatment" , and "Treatment subgroup") or contain special characters (like + or () the following statement does not result in the desired contrast level selection.
sum_contrasts_level <- sum_contrasts[grepl(sum_level, sum_contrasts$contrast), ]
In the first situation (see anl2 in the below code), it will return a dataframe of 2 rows, rather than just 1. In the latter (see anl3 in the below code), sum_contrasts_level will have 0 rows.sessionInfo()
Relevant log output
Code of Conduct
Contribution Guidelines
Security Policy