[R] Indexing lists

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Sep 16 13:57:51 CEST 2004


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,])
 
-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list