GitHub answers with a list of records, each a list of fields. chr(), num() and
lgl() take one field from each record, as text, as numbers or as TRUE and FALSE. A field
that a record lacks, or that is null, is NA in chr() and num(), and FALSE in lgl().
Usage
chr(x, name)
num(x, name)
lgl(x, name)
Arguments
- x
A list of records, each a list of fields.
- name
The name of the field.
Value
A vector with one element per record.
Examples
repos <- list(list(name = "rwf", stargazers_count = 12, fork = FALSE),
list(name = "snp", stargazers_count = 3))
rghcard:::chr(repos, "name")
#> [1] "rwf" "snp"
rghcard:::num(repos, "stargazers_count")
#> [1] 12 3
rghcard:::lgl(repos, "fork")
#> [1] FALSE FALSE