get_scales: Extracts a list of item names based on dic information

View source: R/get_scales.R

get_scalesR Documentation

Extracts a list of item names based on dic information

Description

Extracts a list of item names based on dic information

Usage

get_scales(data, ...)

Arguments

data

A data.frame with dic information.

...

A logical expression defining a selection definition or a name defining a dic attribute for automatic scale definition.

Details

This function is basically a wrapper around the select_items(data = data, filter = ..., names_only = TRUE) function. It takes multiple filter expressions for a single data frame and returns the item names. This is mostly helpful for functions that take multiple scale definitions like alpha_table(). If you provide a name instead of a logical expression, that name must be a dic attribute. A list of scales will be created based on all values of that attribute.

Value

A (named) list with character vectors of item names.

Examples

## define individual scales
get_scales(ex_itrf,
  'APD' = subscale_2 == "APD",
  'OPP' = subscale_2 == "OPP",
  "SW" = subscale_2 == "SW",
  'AD' = subscale_2 == "AD"
)

## generate scale list based on all instances of an attribute
get_scales(ex_itrf, subscale_2)

jazznbass/scaledic documentation built on July 19, 2023, 12:50 a.m.