Re: [R] creating a matrix of "objects"

2005-10-26 Thread hadley wickham
> Problem: I need to get a "matrix" of "datapoints". > Each datapoint has to contain tree attributes. Have you tried: m <- matrix(list(), nrbases, nrbases) ? You would then index it using m[[i,j]].A list is a basic vector, so you can make a matrix with it, just as you can with a ve

[R] creating a matrix of "objects"

2005-10-26 Thread Andreas Lehnert
Dear R, I´m really new to R, so it could be that my question is one of those "read the manual" ones. But I did that and found nothing. Problem: I need to get a "matrix" of "datapoints". Each datapoint has to contain tree attributes. trials like: make.LDmatrix <- function(nrbases){