sample from normal distribution, given summary stats

take.samples(summary, sample.size = 10^6)

Arguments

summary

data.frame with values of mean and sd

sample.size

number of samples to take

Value

sample of length sample.size

Author

David LeBauer, Carl Davidson

Examples

## return the mean when stat = NA
take.samples(summary = data.frame(mean = 10, stat = NA))
#> [1] 10
## return vector of length \code{sample.size} from N(mean,stat)
take.samples(summary = data.frame(mean = 10, stat = 10), sample.size = 10)
#>  [1] 22.6295428  6.7376664 23.2979926 22.7242932 14.1464143 -5.3995004
#>  [7]  0.7143297  7.0527955  9.9423283 34.0465339