[R] Indexing lists

Sean Davis sdavis2 at mail.nih.gov
Thu Sep 16 14:04:44 CEST 2004


On Sep 16, 2004, at 7:57 AM, Peter Dalgaard wrote:

> Sean Davis <sdavis2 at mail.nih.gov> writes:
>
>> Maybe not the best solution, but something like:
>>
>> lapply(mylist,function(x)
>> {return(list(FirstCol=mylist[,1],FirstRow=mylist[1,]))})
>
> ITYM  list(FirstCol=x[,1],FirstRow=x[1,])
>
Uh, Duh!

Thanks.  Some help I am....




More information about the R-help mailing list