View source: R/calculateDescriptives.R
calculateDescriptives | R Documentation |
Calculate descriptive statistics which should be included in the codebook.
calculateDescriptives(
GADSdat,
inputForDescriptives,
verbose = FALSE,
showCallOnly = FALSE
)
GADSdat |
Object of class |
inputForDescriptives |
|
verbose |
Print variable and function information to console? |
showCallOnly |
Logical: only for diagnostics. If TRUE, no calculation is proceed, and only the function which is called for calculation is returned. |
Returns a list of descriptive statistics. This format may seem unsuitable for direct further processing in R, but is primarily used for the automatic creation of codebooks using Latex.
# import spss exemplary data
file <- system.file("extdata", "example1_clean.sav", package = "eatCodebook")
dat <- eatGADS::import_spss(file)
# create variable information by the eatCodebbok function createInputForDescriptives
# This table 'varInfo' can be exported to Excel for further inspection and used as a
# blueprint of what the necessary 'inputForDescriptives' argument for the
# calculateDescriptives() function should look like
varInfo <- createInputForDescriptives(dat, impExpr = "plausible value")
# calculate descriptives
descr <- calculateDescriptives(dat, varInfo)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.