Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Dimitris Rizopoulos
try this: sapply(estIID50, "[[", 'para') Best, Dimitris On 6/27/2012 2:17 PM, Al Ehan wrote: Sorry, one more simple question. how do I pick, from the generated lapply, the $para for each X. say here I have 2 generated list from previous function. how do I take only the $para for each X? Tha

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
Sorry, one more simple question. how do I pick, from the generated lapply, the $para for each X. say here I have 2 generated list from previous function. how do I take only the $para for each X? Thank you so much for your kindness. $X1 $X1$type [1] "gev" $X1$para xi alpha ka

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
It's working I am excited than ever!! Thank you so much On Wed, Jun 27, 2012 at 12:45 PM, Dimitris Rizopoulos < d.rizopou...@erasmusmc.nl> wrote: > you will have to check what function pargev() returns as a result. I would > guess that is probably a list. In any case, you could use someth

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Rui Barradas
Hello, Try the following. estIID50 <- apply( IID50, 2, function(x) pargev(lmom.ub(x)) ) And see ?apply Hope this helps, Rui Barradas Em 27-06-2012 12:31, Al Ehan escreveu: Hi R-users, I'm trying to repeat the same procedure to 1000 data set. I know this is very easy, but I got stuck findin

Re: [R] how to apply the same function to multiple data set

2012-06-27 Thread Dimitris Rizopoulos
you will have to check what function pargev() returns as a result. I would guess that is probably a list. In any case, you could use something like the following: estIID50 <- lapply(IID50, function (m) pargev(lmom.ub(m))) I hope it helps. Best, Dimitris On 6/27/2012 1:31 PM, Al Ehan wrote:

[R] how to apply the same function to multiple data set

2012-06-27 Thread Al Ehan
Hi R-users, I'm trying to repeat the same procedure to 1000 data set. I know this is very easy, but I got stuck finding the right and fastest way in running it. IID50=Riidf[1:50,1:1000] #where IID50 is a dataframe consist of 1000 time series(as column) and 50 time scales (row). #what I tried to