|
|
|
|
|
by minimaxir
2931 days ago
|
|
> This is a very bad example of what factors are for in R, because it makes it seem like factors are for defining variables or keys in key value pairs That is the approach for tidy data, which is used a lot in the R tidyverse (http://tidyr.tidyverse.org/articles/tidy-data.html) |
|
> That is the approach for tidy data, which is used a lot in the R tidyverse (http://tidyr.tidyverse.org/articles/tidy-data.html)
Do you have a reference to where Hadley et al. suggest using factors in a key-value system? I'm reading Wickham's books at the moment and have not seen this assertion. Indeed, I believe he would not state this, as he explains the utility of factors explicitly:
Advanced R, pp. 21-22