longSCDF: Creating a long format data framefrom several single-case...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/scan.R

Description

The longSCDF function transposes a scdf into one long data frame. Additionally, a data frame can be merged that includes data of the subjects.

Usage

1
longSCDF(data, l2 = NULL, id = "case", model = NULL, ...)

Arguments

data

A single-case data frame (scdf).

l2

A dataframe providing additional variables at Level 2. The scdf has to have names for all cases and the Level 2 dataframe has to have a column named 'cases' corresponding case names.

id

Variable name of the Level 2 data frame that contains the case names.

model

If set, calculates interaction terms (see 'method' argument in plm function).

...

Additional arguments provided to the internally used merge function.

Value

Returns one data frame with data of all single-cases structured by the variable 'case'.

Author(s)

Juergen Wilbert

See Also

makeSCDF, makesingleSC, writeSC

Examples

1
2
3
4
## Convert the list of three single-case data frames from Grosche (2011) into one long data frame
Grosche2011
Grosche2011_long <- longSCDF(Grosche2011)
Grosche2011_long

scan documentation built on Nov. 17, 2017, 2:13 p.m.