
Last chance! 50% off unlimited learning
Sale ends in
Identify the observations that contain a specific value in a logical map
# S3 method for LogMap
labels(
object,
values,
select = c("first", "last", "common", "all"),
simplify = TRUE,
...
)
labels
: A list, or vector if simplify
is TRUE
,
of all values and the observations they're found in, according
to the value of select
A LogMap
object
A vector of values to find observations for
Observation selection method; choose from:
“first
”: the first observation the value is found in
“last
”: the last observation the value is found in
“common
”: the first most-common observation the value
is found in; most-common is determined by the observation that contains
the most of the values requested
“all
”: all observations the value is found in
Simplify the resulting list to a vector
Ignored
Logical map objects, validity, and interaction methods:
LogMap
,
LogMap-validity
,
as.matrix.LogMap()
,
droplevels.LogMap()
,
intersect.LogMap()
map <- LogMap(letters[1:10])
map[['obs']] <- c(1, 3, 7)
map[['entry']] <- c(2, 7, 10)
# Find observations for a set of values
labels(map, c('a', 'b', 'g'))
Run the code above in your browser using DataLab