Re: [R] List operations in R

2007-11-29 Thread Rolf Turner
?unname ?unlist cheers, Rolf Turner On 30/11/2007, at 1:07 PM, Srinivas Iyyer wrote: > hello: > > I am very confused when it comes to list operations in > R. > > I seek help in the following problem. > > I have two different vectors > > myIDs - a character vector with no

Re: [R] List operations in R

2007-11-29 Thread jim holtman
To remove the 'names': > x2 <- c('1001_a'='123', '1002_b'='345') > x2 1001_a 1002_b "123" "345" > names(x2) <- NULL > x2 [1] "123" "345" > To append: > z <- letters[1:4] > z [1] "a" "b" "c" "d" > z <- c(z,x2) > z [1] "a" "b" "c" "d" "123" "345" > On Nov 29, 2007 7:07 PM, Srinivas

[R] List operations in R

2007-11-29 Thread Srinivas Iyyer
hello: I am very confused when it comes to list operations in R. I seek help in the following problem. I have two different vectors myIDs - a character vector with no names to their elements x2 - another character vector derived from unlisting a list where an element has both a name and value