Hi Andy,
You forgot a comma at the end:
people[sample(1:nrow(people), 10, replace = TRUE),]
Now it should work as expected :-)
HTH,
Jorge
On Tue, Jan 27, 2009 at 9:44 PM, Andy wrote:
> I would like to create a random sample of the rows of a data frame that
> is larger than the number of row
I would like to create a random sample of the rows of a data frame that
is larger than the number of rows in the data frame. With an individual
vector, this is easy using select(variable, number, replace = TRUE). I
looked on-line I found some guides to sample from a data frame using
indexing, but I
2 matches
Mail list logo