Learn R Programming

saeSim (version 0.11.0)

base_id: Construct data with id-variables

Description

This function constructs a data frame with grouping/id variables.

Usage

base_id(nDomains = 10, nUnits = 10)

base_id_temporal(nDomains = 10, nUnits = 10, nTime = 10)

Arguments

nDomains

The number of domains.

nUnits

The number of units in each domain. Can have length(nUnits) > 1.

nTime

The number of time points for each units.

Value

Return a data.frame with variables idD as ID-variable for domains, and idU as ID-variable for units.

Examples

Run this code
# NOT RUN {
base_id(2, 2)
base_id(2, c(2, 3))
# }

Run the code above in your browser using DataLab