unparse.trait: unparse a collapsed trait string

Description Usage Arguments Value

View source: R/rds.r

Description

for a few of the RDS-related functions, it is useful to combine several traits into one variable as a string; for example, "male" and "young" might become "male.young". this function takes a string with combined traits and explodes it back into several variables

Usage

1
unparse.trait(trait.string, names, sep = "\\.")

Arguments

trait.string

a vector whose values are collapsed traits

names

a vector with the names of each trait (in order)

sep

the character used to separate the traits in their collpased string representation

Value

a dataframe whose rows correspond to the entries in trait.string, with one column per trait


surveybootstrap documentation built on May 29, 2017, 9:09 a.m.