Re: [R] Apply a loop containing a function on a list

2012-03-14 Thread jim holtman
Without a subset of data, it is hard to come up with a solution. Now here is a way of determining what names are in common and then maybe doing something: B.names <- names(B.list) A.names <- names(A.list) common <- intersect(B.names, A.names) for (i in common){ B.list[[i]] <- function(A.list[

Re: [R] Apply a loop containing a function on a list

2012-03-14 Thread Milan Bouchet-Valat
Le mercredi 14 mars 2012 à 00:51 -0700, ali_protocol a écrit : > Hi all, > I want to do this: > > B.list$aa= (a loop containing My.fun acting on the reults of second > function on a A.list$aa)) > or, overally > B.list$aa = function (A.list$aa) > B.list and A.list has ma

[R] Apply a loop containing a function on a list

2012-03-14 Thread ali_protocol
Hi all, I want to do this: B.list$aa= (a loop containing My.fun acting on the reults of second function on a A.list$aa)) or, overally B.list$aa = function (A.list$aa) B.list and A.list has many sublists aa, ab and Is there a way I can apply the function and