Extract shortnames
Source:R/covariate.R, R/design_generics.R, R/event_model.R, and 2 more
shortnames.RdSuperseded by conditions(x, style = "display").
Usage
# S3 method for class 'covariate_term'
shortnames(x, ...)
# S3 method for class 'covariate_convolved_term'
shortnames(x, ...)
shortnames(x, ...)
# S3 method for class 'event_model'
shortnames(x, drop.empty = TRUE, ...)
# S3 method for class 'convolved_term'
shortnames(x, ...)
# S3 method for class 'event_seq'
shortnames(x, ...)
# S3 method for class 'feature_term'
shortnames(x, ...)Details
Short names give the factor levels only, joined with : for
interactions (for example A:x). See longnames() for the qualified
names and how they relate to design-matrix columns.
Examples
# Create a simple event term with one condition factor
term <- event_term(
list(condition = factor(c("A", "B", "A"))),
onsets = c(0, 10, 20),
blockids = c(1, 1, 1)
)
shortnames(term) # Returns: "A" "B"
#> [1] "A" "B"
# Create event term with multiple factors
term2 <- event_term(
list(
category = factor(c("face", "scene", "face")),
attention = factor(c("attend", "attend", "ignore"))
),
onsets = c(0, 10, 20),
blockids = c(1, 1, 1)
)
shortnames(term2) # Returns: "face:attend" "scene:attend" "face:ignore"
#> [1] "face:attend" "scene:attend" "face:ignore"