I am trying to run a 3-way ANOVA in R, but my values for each variable are in one column and not separated by rows. Currently, my data frame looks something like this:
Season Site Location Replicate Lengths
Jan_16 MI Adj 1.00 ,
Jan_16 MI Adj 2.00 ,
Jan_16 MI Adj 3.00 ,
Jan_16 MI Away 1.00 3,4,
Jan_16 MI Away 2.00 ,
Jan_16 MI Away 3.00 ,
Jan_16 MP Adj 1.00 4,5,6,5,4,5,4,4,4,4,5,4,6,4,
Jan_16 MP Adj 2.00 4,4,3,3,5,4,3,4,5,3,4,3,4,3,4,6,
Jan_16 MP Adj 3.00 4,6,5,5,4,
Jan_16 MP Away 1.00 ,4,4,10,4,5,4,6,5,5,
Jan_16 MP Away 2.00 3,4,4,4,5,5,4,5,
Jan_16 MP Away 3.00 4,4,13,4,
Lengths
is the response variable that I wish to run the ANOVA on, how would I do this? Just a "," means there is no data.
**** EDIT
I have tried separate rows
library(tidyr)
separate_rows(data.frame, Season:Replicate, Lengths, convert=numeric )
#Error: All nested columns must have the same number of elements
The Lengths have a different number of variables, so is there a way to unnest this?