On Tue, Nov 24, 2009 at 1:01 AM, Henrique Dallazuanna <www...@gmail.com> wrote: > Try this: > > test[grep("d2", names(test))] > Or it can be simply like this:
test[names(test) == "d2"] > On Mon, Nov 23, 2009 at 2:53 PM, Rajasekaramya <ramya.vict...@gmail.com> > wrote: >> >> Hi There, >> >> I have a named List object.I want to access all the list elements that has >> the same name >> for example >> The List >> test <- list() >> $d2 >> v1 v2 v3 v4 >> 1 2 3 4 5 >> >> $d2 >> v1 v2 v3 v4 >> 1 2 3 4 5 >> >> $d3 >> v1 v2 v3 v4 >> 8 9 19 10 >> >> $d1 >> v1 v2 v3 v4 >> 12 14 15 16 >> >> so if i say test[["d2"]] or test["d2"] i should get the first two that >> matches the name rite but i am not getting them jus getting the first one. >> >> Any suggestions on it >> >> Ramya >> >> >> >> >> >> >> -- >> View this message in context: >> http://old.nabble.com/List-Name-help-tp26481873p26481873.html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> R-help@r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. >> > > > > -- > Henrique Dallazuanna > Curitiba-Paraná-Brasil > 25° 25' 40" S 49° 16' 22" O > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.