[R] Problem of vocabulary : retrieve element of a list of a list
jiho
jo.irisson at gmail.com
Fri Aug 31 10:51:27 CEST 2007
On 2007-August-31 , at 10:17 , Ptit_Bleu wrote:
>> x<-list(LETTERS[1:5], LETTERS[10:20])
not sure to have understood exactly what you meant.
if you want to search for the D in the list:
lapply(x,charmatch,"D")
should get you started.
if you just want to know the syntax to extract an element from a list
x[[1]][4]
will get you the "D". but I a sure you would have found out if you
read the manual carefully.
maybe you should read an R introduction and practice on the examples
there rather than go straight into your own data. It would take a
week at most and is very rewarding in the long term.
An introduction in english:
http://cran.r-project.org/doc/manuals/R-intro.pdf
A nice one in French
http://www.cran.r-project.org/doc/contrib/Paradis-rdebuts_fr.pdf
Cheers,
JiHO
---
http://jo.irisson.free.fr/
More information about the R-help
mailing list