Attempt to locate variables in a set of mapped variables.
Source:R/datacommons_find_variables.R
datacommons_find_variables.Rd
Somewhat fuzzily match entered variable names to mapped variable names, which might be useful if variable names are specified in a view, but are changed slightly in their source repositories.
Arguments
- missed
A vector of variable names or keywords to search for in the full set of mapped variables, or the name of or path to a data commons view, from which to extract missed variables.
- map
Path to the
variable_map.csv
file created bydatacommons_map_files
, the path to a data commons project, or a variable mapdata.frame
.- sep
A regular expression to be treated as a term separator.
- top
Number of possible matches to return per
missed
entry.- metric
Name of the similarity metric to use; see
lma_simets
.
Value
A list with an entry for each entered variable, containing top
possible matches,
which are entries from the variable map, with an added .
Examples
if (FALSE) {
# from a data commons project directory
datacommons_find_variables(c("variable_a", "variable_b"))
# try to find matches to any missed variables in a view
datacommons_find_variables("view_name")
}