If poproh.3 was your dataset as a data.frame (an object with row and
column dimensions), you need a comma following the row selection
(sample(...)) to indicate that you want to select those rows and all
columns:
newsample <-poprho.3[sample(1:1,100),] # note the last comma in the brackets
Gene
We'll probably need much more info, but this should get you started:
nameOfDataSet[sample(1:1, 100),]
You can replace the 1 with dim(nameOfDataSet)[1] to make it more dynamic.
Jeff.
On Tue, Oct 5, 2010 at 3:07 AM, Jumlong Vongprasert
wrote:
> Dear all.
> I have data with 2 variable x,y
Dear all.
I have data with 2 variable x,y size 1.
I want to sampling from this data with size 100.
How I can do it.
THANK.
--
Jumlong Vongprasert
Institute of Research and Development
Ubon Ratchathani Rajabhat University
Ubon Ratchathani
THAILAND
34000
[[alternative HTML version dele
3 matches
Mail list logo