Dear friends,
suppose my dataset is the following data:
id<-1:9
x<-c(1,2,3,1,2,3,1,2,3)
y<-c(1,1,1,2,2,2,3,3,3)
data<-data.frame(id,x,y)
id x y
1 1 1 1
2 2 2 1
3 3 3 1
4 4 1 2
5 5 2 2
6 6 3 2
7 7 1 3
8 8 2 3
9 9 3 3
i want to do sampling like this:say the sample size is 3.
First: random sampling from x;
Next ,random sampling from y ;and combing sampled x and sampled y;
Finally, output the samples: id x and y.
I think i could call it two-dimension sampling.
Thanks very much!
--
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan University
Tel:86-21-54237149
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html