| CombScaleSpec | R Documentation |
Combine multiple ScaleSpec objects into one in regards of sum_items_to_scale()
function. Useful when one scale of factor contains items of different possible
values or if there is hierarchy of scale or factors.
Also allows combining CombScaleSpec object if the factor structure have deeper
hierarchy.
CombScaleSpec(name, ..., reverse = character(0)) ## S3 method for class 'CombScaleSpec' print(x, ...) ## S3 method for class 'CombScaleSpec' summary(object, ...)
name |
Name of the combined scale or factor |
... |
further arguments passed to or from other methods. |
reverse |
character vector containing names of the underlying subscales or factors that need to be reversed |
x |
a CombScaleSpec object |
object |
a CombScaleSpec object |
CombScaleSpec object
Other item preprocessing functions:
ScaleSpec(),
sum_items_to_scale()
# ScaleSpec objects to Combine
first_scale <- ScaleSpec(
name = "First Scale",
item_names = c("Item_1", "Item_2"),
min = 1,
max = 5
)
second_scale <- ScaleSpec(
name = "Second Scale",
item_names = c("Item_3", "Item_4"),
min = 0,
max = 7,
reverse = "Item_3"
)
third_scale <- ScaleSpec(
name = "Third Scale",
item_names = c("Item_5", "Item_6"),
min = 1,
max = 5
)
# You can combine few ScaleSpec objects into CombScaleSpec
first_comb <- CombScaleSpec(
name = "First Comb",
first_scale,
second_scale,
reverse = "Second Scale"
)
print(first_comb)
# And also other CombScaleSpec objects!
second_comb <- CombScaleSpec(
name = "Second Comb",
first_comb,
third_scale
)
print(second_comb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.