As the answers you've received suggest, you
can use a list. Or you could have two
vectors: one with the data, the other with the
group identity. The latter format is likely more
convenient for a lot of analyses.
Since your data are not inherently rectangular,
it is probably best to get the
Indeed both options are salable, though I agree the latter may be more
convenient.
Merci!
Patrick Burns wrote:
As the answers you've received suggest, you
can use a list. Or you could have two
vectors: one with the data, the other with the
group identity. The latter format is likely
I have numerous objects, each containing continuous data representing the
same variable, movement rate, yet each having a different number of rows.
e.g.
d1-as.matrix(rnorm(5))
d2-as.matrix(rnorm(3))
d3-as.matrix(rnorm(6))
How can I merge these three columns side-by-side in order to create a
you can do below but there's no way of getting arounf having NAs in your
final matrix.
d1-as.matrix(rnorm(5))
d2-as.matrix(rnorm(3))
d3-as.matrix(rnorm(6))
templist - list(d1,d2,d3)
maxnum - max(sapply(templist,length))
print(maxnum)
temp - lapply(templist,function(.mat) {
if (nrow(.mat)
Try this also:
sapply(list(d1, d2, d3), [, 1:max(sapply(list(d1, d2, d3), length)))
On Mon, May 5, 2008 at 7:46 PM, T.D.Rudolph [EMAIL PROTECTED]
wrote:
I have numerous objects, each containing continuous data representing the
same variable, movement rate, yet each having a different number
5 matches
Mail list logo