popsamp: Sampling From a Population

Description Usage Arguments Value Author(s) Examples

Description

Instructional function, and possibly a utility function for some apps.

Usage

1
popsamp(n,pop,...)

Arguments

n

number of items to sample

pop

data frame, from which to sample n rows

...

other arguments passed to function

Value

The sample, as a data frame.

Author(s)

Homer White hwhite0@georgetowncollege.edu

Examples

1
2
3
data(imagpop)
popsamp(10,imagpop)  #Simple random sampling (no replacement)
popsamp(10,imagpop,replace=TRUE)  #Random sampling with replacement

homerhanumat/tigerstats documentation built on Sept. 27, 2020, 3:21 a.m.