[R] Indexing lists
Sean Davis
sdavis2 at mail.nih.gov
Thu Sep 16 13:43:01 CEST 2004
Maybe not the best solution, but something like:
lapply(mylist,function(x)
{return(list(FirstCol=mylist[,1],FirstRow=mylist[1,]))})
In any case, look at ?lapply
Sean
On Sep 16, 2004, at 7:33 AM, Perez Martin, Agustin wrote:
> DeaR useRs:
>
> I have a list with 500 elements, in each other there are data.frames
> and I
> want to take the first row and the first column of each elements of my
> list
> since the first to the 500-th.
>
> Thanks and excuse my bad English.
>
> ---
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
More information about the R-help
mailing list