Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


PwrGSD (version 2.3.8)

mystack: Stack a dataset

Description

Given a dataframe containing one or more variables named with a common prefix, this function creates a stacked dataset with one set of observed values of the variables (in order of occurence) per line.

Usage

mystack(object, fu.vars, create.idvar = FALSE)

Value

A stacked dataframe

Arguments

object

a dataframe containing one or more variables named with a common prefix

fu.vars

a list of the unique prefixes

create.idvar

Do you want to add an ID variable with a common value given to all records resulting from a given input record? Default is FALSE

Author

Grant Izmirlian <izmirlian@nih.gov>

Examples

Run this code
  ## none as yet

Run the code above in your browser using DataLab