| CompScoreTable | R Documentation |
Computable ScoreTable class. It can compute and store
ScoreTables
for multiple variables containing raw score results.
After computation, it could be also used to compute new standardized scores for provided raw scores and integrate them into stored tables.
summary() function can be used to get general information about
CompScoreTable object.
new()Initialize a CompScoreTable object. You can attach one or many
StandardScale and FrequencyTable objects
CompScoreTable$new(tables = NULL, scales = NULL)
tablesNamed list of FrequencyTable objects to be attached. Names
will indicate the name of variable for which the table is calculated.
Defaults to NULL, so no tables will be available at the beginning.
scalesStandardScale object or list of such objects to be attached.
They will be used for calculation of ScoreTables. Defaults to NULL, so no
scales wil be available at the beginning.
Both FrequencyTable and StandardScale objects can be attached
with appropriate methods after object initialization.
CompScoreTable object
attach_StandardScale()Attach new scale to the object. If there are any ScoreTables already computed, score for newly-attached scale will be computed automatically.
CompScoreTable$attach_StandardScale(scale, overwrite = FALSE)
scaleStandardScale object defining a scale
overwriteboolean indicating if the definition for a scale of the same name should be overwritten
attach_FrequencyTable()Attach previously generated FrequencyTable for a given
variable. ScoreTable containing every attached scale will be calulcated
automatically based on every new FrequencyTable.
CompScoreTable$attach_FrequencyTable(
ft,
var,
if_exists = c("stop", "append", "replace")
)ftFrequencyTable to be attached
varString with the name of the variable
if_existsAction that should be taken if FrequencyTable for
given variable already exists in the object.
stop DEFAULT: don't do anything
append recalculates existing table
replace replaces existing table
export_ScoreTable()Export list of ScoreTables from the object
CompScoreTable$export_ScoreTable(vars = NULL, strip = FALSE)
varsNames of the variables for which to get the tables.
If left at NULL default - get all off them.
striplogical indicating if the ScoreTables should be stripped
down to FrequencyTables during export. Defaults to FALSE
list of ScoreTable or FrequencyTable object
standardize()Compute standardize scores for data.frame of raw scores.
Additionally, the raw scores can be used to recalculate ScoreTables
before computing (using calc = T).
CompScoreTable$standardize(data, what, vars = names(data), calc = FALSE)
datadata.frame containing raw scores.
whatthe values to get. One of either:
quan - the quantile of raw score in the distribution
Z - normalized Z score for the raw scores
name of the scale attached to the CompScoreTable object
varsvector of variable names which will taken into account
calcshould the ScoreTables be computed (or recalculated, if
some are already provided?). Default to TRUE
data.frame with standardized values
clone()The objects of this class are cloneable with this method.
CompScoreTable$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.