Re: [R] Adding objects to a list

2011-06-20 Thread Mathijs de Vaan
OK, thanks. n is a list containing two list objects (a numeric vector and a matrix). I want to replicate n$vectors within list n and name it n$vectors$test. Thanks On Mon, Jun 20, 2011 at 11:35 AM, David Winsemius wrote: > > On Jun 20, 2011, at 5:00 AM, mdvaan wrote: > > #Hi list, >> >> #From th

Re: [R] Adding objects to a list

2011-06-20 Thread David Winsemius
On Jun 20, 2011, at 5:40 AM, Mathijs de Vaan wrote: OK, thanks. n is a list containing two list objects (a numeric vector and a matrix). I want to replicate n$vectors within list n and name it n$vectors$test. Thanks Since you probably already have the mangled object: > n$vectors$test <-

Re: [R] Adding objects to a list

2011-06-20 Thread David Winsemius
On Jun 20, 2011, at 5:00 AM, mdvaan wrote: #Hi list, #From the code below I get two list objects (n$values and n$vectors): One of which is a numeric vector and the other of which is a matrix. dat <- matrix(1:9,3) n<-eigen(dat) n # How do I add another object to n that replicates n$vectors

Re: [R] Adding objects to a list

2011-06-20 Thread Jannis
How about using the available introductory material for such basic questions? This link for example will tell you what to do: http://cran.r-project.org/doc/manuals/R-intro.html#Constructing-and-modifying-lists HTH Jannis --- mdvaan schrieb am Mo, 20.6.2011: > Von: mdvaan > Betreff: [R] Addi