View source: R/datacommons_find_variables.R
datacommons_find_variables | R Documentation |
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.
datacommons_find_variables(missed, map = ".", sep = "[_:]", top = 3,
metric = "cosine")
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 |
sep |
A regular expression to be treated as a term separator. |
top |
Number of possible matches to return per |
metric |
Name of the similarity metric to use; see |
A list with an entry for each entered variable, containing top
possible matches,
which are entries from the variable map, with an added .
## Not run:
# 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")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.