popsamp | R Documentation |
Instructional function, and possibly a utility function for some apps.
popsamp(n,pop,...)
n |
number of items to sample |
pop |
data frame, from which to sample n rows |
... |
other arguments passed to function |
The sample, as a data frame.
Homer White hwhite0@georgetowncollege.edu
data(imagpop)
popsamp(10,imagpop) #Simple random sampling (no replacement)
popsamp(10,imagpop,replace=TRUE) #Random sampling with replacement
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.