ids_of_types {eratosthenes} | R Documentation |
Ids of Types
Description
Given a list
object of finds (with keys of id
, assoc
, type
in each entry), return a vector of the id
elements that belong to one or more specified type.
Usage
ids_of_types(input, type = NULL)
## S3 method for class 'list'
ids_of_types(input, type = NULL)
Arguments
input |
A |
type |
A vector or element |
Value
A vector of ids within a list
object of finds
class,
Examples
f1 <- list(id = "find01", assoc = "D", type = c("type1", "form1"))
f2 <- list(id = "find02", assoc = "E", type = c("type1", "form2"))
f3 <- list(id = "find03", assoc = "G", type = c("type1", "form1"))
f4 <- list(id = "find04", assoc = "H", type = c("type2", "form1"))
f5 <- list(id = "find05", assoc = "I", type = "type2")
f6 <- list(id = "find06", assoc = "H", type = NULL)
artifacts <- list(f1, f2, f3, f4, f5, f6)
ids_of_types(artifacts, type = "type1")
ids_of_types(artifacts, type = c("type1", "type2"))
[Package eratosthenes version 0.0.9 Index]