p1982[sample(nrow(p1982),200000),]
On 12/8/06, Aimin Yan <aiminy@iastate.edu> wrote:>
> I have a data set like this:
> if I want to less than 200000 obs from this data set.
> How can I do these?
>
> > str(p1982)
> 'data.frame': 465979 obs. of 6 variables:
> $ p : Factor w/ 1982 levels "154l_aa","1A0P_aa",..: 1
1 1 1 1 1 1 1 1 1
> ...
> $ aa : Factor w/ 19 levels
"ALA","ARG","ASN",..: 2 16 4 5 18 3 19 3 2 9
> ...
> $ as : num 152.0 15.9 65.1 57.2 28.9 ...
> $ ms : num 108.8 28.3 59.2 49.9 31.8 ...
> $ cur: num -0.1020 0.2564 0.0312 -0.0550 0.0526 ...
> $ sc : num 92.10 103.67 7.27 72.98 96.12 ...
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem you are trying to solve?
[[alternative HTML version deleted]]