Dear all,

I have to select 122 stratified random samples from a population of 
 >3900 cells. I have 41 strata and I  have to draw a different number of 
samples from them(between 2 and 8).

I have tried to apply the funtion strata following the instruction in 
the manual:

strata(dataframe, stratanames=NULL, size, method=c("srswor"), 
pik,description=TRUE)

but I get the error message

Error in data.frame((1:nrow(data))[srswor(size, nrow(data)) == 1], rep(size/nrow(data),  :
   arguments imply differing number of rows: 3, 122

My stratanames and size vectors have the same length, 41 (the number of strata), and 122 is the number of samples I need. The size vector is sorted in the order the strata have in the dataframe (dim 3960 8).

names(dataframe)
[1] "lond"        "latd"        "stratanames" "cell"        "lat"         "lon"         "div"         "ID_unit"


Have I misunderstood the instructions in sampling.pdf??

Thanks,

Elena




	[[alternative HTML version deleted]]

