Learn R Programming

ptable (version 1.0.0)

pt_ex_nums: Quick ptables for numeric variables

Description

pt_ex_nums() returns a perturbation table objects from create_num_ptable() with some default parameters. This is useful for quickly creating ptables to demonstrate usage in other tools.

Usage

pt_ex_nums(parity = TRUE, separation = FALSE)

Value

Returns a ptable object if both parity and separation

are FALSE, else a named list.

Arguments

parity

a scalar logical; if TRUE, a single ptable will be generated. If FALSE, two ptables for even and odd numbers are created

separation

a scalar logical; if TRUE, an additional ptable with variance 1 will be returned that is designed to perturb small cell values

Examples

Run this code
# \donttest{
# extra ptable for small cells
names(pt_ex_nums(parity = FALSE, separation = TRUE))

# different ptables for even/odd cells
names(pt_ex_nums(parity = TRUE, separation = TRUE))
# }

Run the code above in your browser using DataLab