rpin: Generate a vector of random 'pin'

Description Usage Arguments Value Examples

View source: R/rin.R

Description

A function that generates random pins (see as.pin). The generated pin is uniformely distributed over the time period.

Usage

1
2
3
4
5
6
7
rpin(
  n,
  start_date = "1900-01-01",
  end_date = Sys.Date(),
  p.male = 0.1,
  p.coordn = 0.1
)

Arguments

n

number of observations. If length(n) > 1, the length is taken to be the number required.

start_date

Smallest possible pin. Default is 1900-01-01.

end_date

Largest possible pin. Default is the current date.

p.male

Proportion of males. Default is 0.5.

p.coordn

Proportion of coordination numbers. Default is 0.1.

Value

a vector of generated pins.

Examples

1
2
3
4
x <- rpin(3)
pin_ctrl(x)
pin_sex(x)
pin_age(x)

sweidnumbr documentation built on March 31, 2020, 5:24 p.m.