In: Statistics and Probability
Please provide R-code for the following question:
The second argument to `split` can be a list of factors. The result is that all interactions (possible combinations) are used for the groups. In the `ToothGrowth` data set, growth (`len`) is measured for two types of supplements (`supp`) and three doses (`dose`). Split this `len` value into 6 groups.
Gol:
Total 6 combinations
len is split by supp and dose
Rcode:
ToothGrowth
attach(ToothGrowth)
Groups <- split(ToothGrowth$len,
list(ToothGrowth$supp,ToothGrowth$dose))
Groups
Output: