syn_pop: Create a synthetic population having several states.

Description Usage Arguments Value Examples

Description

Populate a matrix in which columns represent the states of the individuals and rows represent the individuals.

Usage

1
syn_pop(states, shuffle = FALSE)

Arguments

states

A numeric vector with each element representing the number of individuals in a particular state its index corresponds to.

shuffle

A logical value to enable shuffling of the individuals (rows) in the resulting matrix.

Value

A matrix of 0s, and 1s. The rows representing the individuals and the columns representing the states the individuals are in

Examples

1
2
syn_pop(c(3,2,1))
syn_pop(c(0,0,1,5), shuffle=TRUE)

ibmcraftr documentation built on May 1, 2019, 11:31 p.m.