Re: [R] list of list objects

2008-11-21 Thread Jagat.K.Sheth
?unlist -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rajasekaramya Sent: Friday, November 21, 2008 2:14 PM To: r-help@r-project.org Subject: [R] list of list objects hi there, I have a list of list objects i need to remove the top layer [[1]] [1

Re: [R] list of list objects

2008-11-21 Thread Jagat.K.Sheth
?unlist -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rajasekaramya Sent: Friday, November 21, 2008 2:14 PM To: r-help@r-project.org Subject: [R] list of list objects hi there, I have a list of list objects i need to remove the top layer [[1]] [1

Re: [R] list of list objects

2008-11-21 Thread jim holtman
Will one of these two solutions work for you: > x <- list(list(1,2), list(3,4), list(5,6)) > x [[1]] [[1]][[1]] [1] 1 [[1]][[2]] [1] 2 [[2]] [[2]][[1]] [1] 3 [[2]][[2]] [1] 4 [[3]] [[3]][[1]] [1] 5 [[3]][[2]] [1] 6 > > lapply(x, "[[", 1) [[1]] [1] 1 [[2]] [1] 3 [[3]] [1] 5 > lapply(x,

[R] list of list objects

2008-11-21 Thread Rajasekaramya
hi there, I have a list of list objects i need to remove the top layer [[1]] [1].0 "ABC" "DEF""LMN" [1].1 "WER" "ERT" "TRY" [[2]] [2].0 "ASD","wer""qwe" [2].1 "wdv""ghj""ggj" I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there just a simple list is wat i need. [1].0 "ABC" "DEF"