joon-e / tidycomm

tidycomm: Data Modification and Analysis for Communication Research
https://joon-e.github.io/tidycomm/
GNU General Public License v3.0
15 stars 5 forks source link

unianova cannot handle spaces in column names #12

Closed MarHai closed 3 years ago

MarHai commented 4 years ago

Hi,

when handling column names that include a space (I know, bad practice, but still ...), unianova dies with a rather cryptic error message. This is presumably happening in https://github.com/joon-e/tidycomm/blob/7de8942c0c83a5f1453d2f101909ce0e140ad0ec/R/unianova.R#L70

Here is an example, working (first) and not working (second).

WoJ %>% 
  select(employment, autonomy_selection) %>% 
  unianova(employment)

WoJ %>% 
  select(employment, `autonomy selection` = autonomy_selection) %>% 
  unianova(employment)
joon-e commented 3 years ago

a628aee764296613cb6c0c624de87bb79f6a356e