Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Michael Larkin
: r-help@r-project.org Subject: Re: [R] need help with ramdomly sampling some data Mike, It works for me: > data <- 1:8 > sample(data,replace=TRUE) [1] 6 4 5 2 5 8 7 2 Please provide a reproducible example, if possible, and the output of sessionInfo(). Jonathan On Tue, Sep 28, 2010

Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Jonathan Christensen
Mike, It works for me: > data <- 1:8 > sample(data,replace=TRUE) [1] 6 4 5 2 5 8 7 2 Please provide a reproducible example, if possible, and the output of sessionInfo(). Jonathan On Tue, Sep 28, 2010 at 7:22 PM, Michael Larkin wrote: > I am trying to get R to randomly select values from my d

Re: [R] need help with ramdomly sampling some data

2010-09-28 Thread Peter Langfelder
On Tue, Sep 28, 2010 at 6:22 PM, Michael Larkin wrote: > I am trying to get R to randomly select values from my dataset (i.e. > bootstrapping) with replacement.  However, my attempts at this have been > unsuccessful.  Here is a basic example of what I am doing: > > I have a data vector of 8 values

[R] need help with ramdomly sampling some data

2010-09-28 Thread Michael Larkin
I am trying to get R to randomly select values from my dataset (i.e. bootstrapping) with replacement. However, my attempts at this have been unsuccessful. Here is a basic example of what I am doing: I have a data vector of 8 values (i.e. data= 2,5,9,4,5,6,7,8). I used the sample function and