Learn R Programming

ASMbook (version 1.0.2)

simDat4: Simulate data for Chapter 4: Model of the mean

Description

Simulate body mass measurements for n peregrine falcons from a normal distribution with population mean = 'mean' and population sd = 'sd'

Usage

simDat4(n = 10, mean = 600, sd = 30)

Value

A list of simulated data and parameters.

n

Sample size

mean

Population mean

sd

Population SD

y

Simulated peregrine mass measurements

Arguments

n

The sample size

mean

Population mean

sd

Population standard deviation

Author

Marc Kéry

Examples

Run this code
str(dat <- simDat4())          # Implicit default arguments
str(dat <- simDat4(n = 10^6))  # More than the world population of peregrines
str(dat <- simDat4(n = 10, mean = 900, sd = 40))  # Simulate 10 female peregrines

Run the code above in your browser using DataLab