Skip to content
Back to formatted view

Raw Message

Message-ID: <f8e6ff050510260619n3e18edcay6890dd2271cbc67d@mail.gmail.com>
Date: 2005-10-26T13:19:18Z
From: Hadley Wickham
Subject: creating a matrix of "objects"
In-Reply-To: <8928.1130317417@www38.gmx.net>

> 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
vector of numbers.

Hadley