prepareSGP(data, data_supplementary=NULL, state=NULL, var.names=NULL, create.additional.variables=TRUE, fix.duplicates=NULL)
data | A panel data set in long form or an object of class SGP. See embedded |
---|---|
data_supplementary | Supplementary data (e.g., student teacher lookup tables) to be embedded in SGP object in slot @Data_Supplementary. Data must be embedded in a list. Default is no data supplied. |
state | A two letter acronym 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 data.frame that includes all required columns that do not match the SGP conventions, as well as all secondary columns needed for summarizing 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
|
fix.duplicates | Argument to control how |
Function returns an object of class SGP
. The long data is
in the data
slot.
not_run({ ## prepareSGP is Step 1 of 5 of abcSGP Demonstration_SGP <- prepareSGP(sgpData_LONG) ## Running prepareSGP on an already create SGP object as part of a annual update Demonstration_SGP <- prepareSGP(Demonstration_SGP) ## Running prepareSGP on a long data set without creating addition variables Demonstration_SGP <- prepareSGP(sgpData_LONG, create.additional.variables=FALSE) })