try this,
do.call(rbind, resample2)
#or simply,
replicate(1000, Cusum(sample(lambs,replace=F)))
you could also look at the plyr package.
Hope this helps,
baptiste
On 10 Apr 2009, at 09:03, Melissa2k9 wrote:
Hi,
I have used this command :
resamples<-lapply(1:1000,function(i) sample(lam
xtracted from a given body of
data.
~ John Tukey
-Oorspronkelijk bericht-
Van: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Namens Melissa2k9
Verzonden: vrijdag 10 april 2009 10:04
Aan: r-help@r-project.org
Onderwerp: [R] turning list into vector/dataframe
Hi,
I
Hi Melissa,
L <- list(min=rnorm(5),mean=rnorm(5),max=rnorm(5))
matrix(unlist(L),ncol=3)
gives what you want
Alain
Melissa2k9 wrote:
Hi,
I have used this command :
resamples<-lapply(1:1000,function(i) sample(lambs,replace=F))
resamples2<-lapply(resamples,Cusum)
to get a list of 1000 samp
Hi,
I have used this command :
resamples<-lapply(1:1000,function(i) sample(lambs,replace=F))
resamples2<-lapply(resamples,Cusum)
to get a list of 1000 samples of my data. The function Cumsum is defined as
follows:
Cusum<-function(x){
SUM<-cumsum(x)-(1:length(x))*mean(x)
min<-min(cumsum(x)-(1:l
4 matches
Mail list logo