[R] Indexing lists

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


"Perez Martin, Agustin" <agustin.perez at umh.es> writes:

> 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.

Possibly (if I catch your drift...)

lapply(yourlist,"[",1,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