Description Usage Arguments Examples
View source: R/script - base tools.R
Similar to merge(), but more flexible (and slower). Supports renaming of columns and overwrite-controll. Returns the "to" dataframe with new columns from "from" added.
1 |
to |
A data frame (x) you want to add data from another set into |
from |
The data (y) frame you want to obtain this data from |
what |
Which columns from y to look up into x. Single chr value or vector with multiple values. Will take all columns from y if unspecified. |
by |
Which column to use for identifying individuals. The function only adds data to columns with matching identifiers. |
by.x |
If the identifier has a different column name in the "to" dataset, specify it with by.x |
by.y |
If the identifier has a different column name in the "from" dataset, specify it with by.y |
new_name |
If you want to rename some columns from y before inserting into x. Must be same length as "what". Use an empty "" for columns to stay the same. |
default |
If inserted columns doesn't exist yet in x, use this to specify the default value in case some rows can't be looked up |
overwrite |
If there is already a value in x where one is to be inserted from y, use this to specify if it should be overwritten or not |
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.