[R] Processing List-elements

Liaw, Andy andy_liaw at merck.com
Mon Jul 14 16:22:46 CEST 2003


If the list components are vectors, you can do something like:

  mylist2 <- lapply(mylist, function(x) x[-1])

Andy

> -----Original Message-----
> From: Michael Kirschbaum [mailto:emkiba at gmx.de] 
> Sent: Monday, July 14, 2003 10:15 AM
> To: R-help at stat.math.ethz.ch
> Subject: [R] Processing List-elements
> 
> 
> Hello.
> I got a problem with processing a list:
> How can I kill the first row of each element of a list, 
> without using a loop? Is there a function that processes each 
> element of a list in a way I can choose? thank you for answering...
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list 
> https://www.stat.math.ethz.ch/mailman/listinfo> /r-help
> 

------------------------------------------------------------------------------
Notice: This e-mail message, together with any attachments, ...{{dropped}}




More information about the R-help mailing list