make_scale_standard: Build standard conceptual scales

Description Usage Arguments Examples

Description

Build standard conceptual scales

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

Arguments

objs

Vector (usually character or factor).

n

Positive integer. The number of objects in the scale. Ignored if objs is present.

scale

Character. Name of standard scale, e.g. "ordinal". Defaults to "nominal".

...

Additional arguments (listed below) passed from scale_standard to specific scale generators.

cut

Numeric. Integer between 0 and length(objs) indicating the index at which to cut objs for biordinal scaling.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
titanic_data <- as.data.frame(Titanic)

# nominal scale
print(make_scale_nominal(objs = titanic_data$Class))

# ordinal scale
print(make_scale_ordinal(objs = titanic_data$Class))

# other scales
for (scale in c("boolean", "revordinal", "interordinal")) {
  print(make_scale_standard(objs = titanic_data$Class, scale = scale))
}

# biordinal scale with custom cut value
print(make_scale_biordinal(objs = titanic_data$Class, cut = 3))

corybrunson/context documentation built on May 13, 2019, 10:52 p.m.