Description Usage Arguments Value Examples
'join_results()' queries a database for matches to a column in the supplied dataset and returns it together with the matches found.
1 | join_results(df, query_col, database, match_cols, select_cols = NULL)
|
df |
A data.frame or tibble. The data used for querying the database. |
query_col |
A character vector of length one. Name of the column in 'df' that will be used to query the database. |
database |
A data.frame or tibble A database to be queried. See [databases()] for a list of included databases. |
match_cols |
A character vector. The columns in the data to look for matches with the query. In order of preference, if matches to a column are found, matches to subsequent columns are not reported by default, unless return_all is 'TRUE'. |
select_cols |
A character vector of column names in the database that will be merged in the ouput. |
The input dataframe merged with the selected matching columns from the database.
1 2 3 4 | d <- data.frame(a = 1:3, b = c("FLG", "SGK2", "CDK1"))
join_results(d, "b", hgnc,
match_cols = c("symbol", "alias_symbol", "prev_symbol"),
select_cols = c("entrez_id", "symbol", "refseq_accession"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.