Re: [R] performing function on lists where each element is a data frame

2009-10-15 Thread Phil Spector
Are you saying that sapply(xx,function(x)weighted.mean(x$H,x$N)) assuming the list of data frames was called xx, doesn't give the result you want? Could you please elaborate as to why sapply doesn't give the correct result? - Phil Spector

[R] performing function on lists where each element is a data frame

2009-10-14 Thread ewaters
I have browsed the archive, and played around with a whole bunch of ways of approaching the problem, and I cannot get the answer that I want. I have a list with 2000 elements. Each element is a data frame with 2 columns. As an example, see element 1999 below. [[1999]] H N 60.54 26 10