Skip to content
Prev 202222 / 398500 Next

vector as data.frame element?

Maybe you can just use a list?

mylis <- list("x", c("y","z"))

element 1 is then mylis[[1]], which is x, and so forth.

But it looks like you really need to 'map' some numbers to your list.
You could use separate vector that keeps track of the index numbers:

index <- c(0,1)

and then map like this:
[1] "x"
[1] "y" "z"

Is that what you want?


Remko


-------------------------------------------------
Remko Duursma
Post-Doctoral Fellow

Centre for Plants and the Environment
University of Western Sydney
Hawkesbury Campus
Richmond NSW 2753

Dept of Biological Science
Macquarie University
North Ryde NSW 2109
Australia

Mobile: +61 (0)422 096908
www.remkoduursma.com
On Tue, Dec 1, 2009 at 2:36 PM, Peng Yu <pengyu.ut at gmail.com> wrote:
Message-ID: <80b45a8c0911301947o46436eddi6d97d3d2918d05b4@mail.gmail.com>
In-Reply-To: <366c6f340911301936g669c080bl61ae4b586477a550@mail.gmail.com>