I am working on split function and I have created two level using gl function and then I have use interaction function on it agter creating split function I have use str function on it and I am getting some num(0) value I want to remove them
x<-rnorm(10)
f1<-gl(2,5)
f2<-gl(5,2)
y<-interaction(f1,f2)
str(split(x,y))
List of 10
1.1: num [1:2] 0.287 1.42
2.1: num(0)
1.2: num [1:2] 0.472 -0.956
2.2: num(0)
1.3: num 0.619
2.3: num -0.296
1.4: num(0)
2.4: num [1:2] -0.496 -1.055
1.5: num(0)
2.5: num [1:2] 1.053 0.322