[R] indexing
Erik Iverson
iverson at biostat.wisc.edu
Thu Mar 27 03:02:13 CET 2008
I find R books to be helpful for beginners. There is a fairly
comprehensive list on the R web site, www.r-project.org.
Is this what you had in mind though? Without example code, it's hard
for me to tell exactly your situation.
test <- list(first = c("string1a", "string2a"), second = c("string1b",
"string2b"))
sapply(test, "[[", 1)
Best,
Erik Iverson
gbr0wn at comcast.net wrote:
> Is there an on-line source that explains index vectors? I used
> 'strsplit' to generate a lengthy list of pairs of character vectors.
> I only want the first of each pair. Brackets, double brackets, and
> '$' operator don't work [[alternative HTML version deleted]]
>
> ______________________________________________ R-help at 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.
More information about the R-help
mailing list