
Set dictionary information to variables
set_dic.Rd
Set dictionary information to variables
Details
Standard attributes are: "item_name"
, "item_label"
, "weight"
,
"type"
, "values"
, "value_labels"
, "missing"
.
Examples
hap_1 <- sample(1:5, 30, replace = TRUE)
set_dic(hap_1,
item_label = "How do you feel today?",
scale = "hap",
scale_label = "Happiness",
values = 1:3,
value_labels = "1 = not happy; 2 = in between; 3 = happy"
)
#> 1: Attribute 'item_name' missing and set to 'hap_1'.
#> 2: Attribute 'type' missing and set to 'integer'.
#> 3: Attribute 'weight' missing and set to 1.
#> # How do you feel today? (Happiness)
#> # Data type is integer
#> # Valid values: 1:3
#> # Value labels:
#> # 1 = not happy
#> # 2 = in between
#> # 3 = happy
#> # Length: 30
#> [1] 5 3 5 3 5 3 2 5 4 4 5 4 1 1 5 1 5 5 2 1 3 3 4 5 2 5 5 5 5 3