man/examples/summary2.R

\dontrun{
# read in the example data (generated, not real student data)
sdf <- readNAEP(path=system.file("extdata/data", "M36NT2PM.dat", package = "NAEPprimer"))

# print out summary of weighted statistics of a continuous variable
summary2(data=sdf, variable="composite")
# print out summary of weighted statistics of a variable, including omitted levels
summary2(data=sdf, variable="b017451", omittedLevels = FALSE)
# make a crosstab
summary2(data=sdf, variable=c("b017451", "dsex"), omittedLevels = FALSE)

# print out summary of unweighted statistics of a variable
summary2(data=sdf, variable="composite", weightVar = NULL)
}

Try the EdSurvey package in your browser

Any scripts or data that you put into this service are public.

EdSurvey documentation built on June 27, 2024, 5:10 p.m.