Displaying 2 results from an estimated 2 matches for "dat13".
Did you mean:
dat1
2010 Mar 30
2
Need help to split a given matrix is a "sequential" way
...,] 100 150 60
[3,] 100 50 60
[4,] 100 100 100
[5,] 100 50 120
Now each of dat1 and dat2 needs to be splited according to the it's 2nd
column i.e.
> dat11 <- dat1[which(dat1[,2] == unique(dat1[,2])[1]),]
> dat12 <- dat1[which(dat1[,2] == unique(dat1[,2])[2]),]
> dat13 <- dat1[which(dat1[,2] == unique(dat1[,2])[3]),]; dat11; dat12;
> dat13
[1] 200 100 80
[,1] [,2] [,3]
[1,] 200 150 180
[2,] 200 150 100
[,1] [,2] [,3]
[1,] 200 50 140
[2,] 200 50 180
similarly for dat2..............
This kind of sequential spliting would continue fo...
2011 Nov 27
1
Simplifying my code
...2=complete(dat.mice,2)
dat3=complete(dat.mice,3)
dat4=complete(dat.mice,4)
dat5=complete(dat.mice,5)
dat6=complete(dat.mice,6)
dat7=complete(dat.mice,7)
dat8=complete(dat.mice,8)
dat9=complete(dat.mice,9)
dat10=complete(dat.mice,10)
dat11=complete(dat.mice,11)
dat12=complete(dat.mice,12)
dat13=complete(dat.mice,13)
dat14=complete(dat.mice,14)
dat15=complete(dat.mice,15)
dat16=complete(dat.mice,16)
dat17=complete(dat.mice,17)
dat18=complete(dat.mice,18)
dat19=complete(dat.mice,19)
dat20=complete(dat.mice,20)
I would like to simplify this into a for loop. I thought this would work...