Learn R Programming

SGP (version 0.9-9.0)

prepareSGP: Prepare data for SGP analyses

Description

Utility function/exemplar used to embed supplied long data into a list object as a keyed data.table.

Usage

prepareSGP(data,
	state=NULL,
	var.names=NULL,
	create.additional.variables=TRUE,
	fix.duplicates="keep.all")

Arguments

data
A panel data set in long form. See embedded sgpData_LONG data set for an exemplar.
state
A two letter acronymn indicating the state associated with the data. If not supplied, the function will try to infer what the state is from the data object name supplied.
var.names
A list or a dataframe that includes all required columns that do not match the SGP conventions, as well as all secondary columns needed for summarization and reporting.
create.additional.variables
Boolean argument indicating whether prepareSGP should create additional variables often used in analyses. For example, the function can create a variable HIGH_NEED_STATUS identifying the top and bottom quartile of students in each school by
fix.duplicates
Argument for future functionality intended to deal with duplicate cases in supplied long data.

Value

  • Function returns an object of class SGP. The long data is in the data slot.

See Also

sgpData_LONG

Examples

Run this code
## prepareSGP is Step 1 of 5 of abcSGP
Demonstration_SGP <- prepareSGP(sgpData_LONG)

Run the code above in your browser using DataLab