enhance_from_keys: enhance_from_keys

Description Usage Arguments Details

Description

Enhance a target data.frame that has one column of keys or IDs from the key-value pair that exists in two columns of a source data.frame.

Usage

1
2
3
4
5
6
7
8
enhance_from_keys(
  target_df,
  source_key_col,
  source_prop_col,
  target_key_col_name,
  target_prop_name,
  remove_target_key_col = TRUE
)

Arguments

target_df

The data.frame to be enhanced.

source_key_col

The column in the reference data.frame containing the keys/IDs, passed as a vector, eg. Employees$id

source_prop_col

The column in the reference data.frame containing the values, passed as a vector, eg. Employees$name

target_key_col_name

The name of the column in the target data.frame containing the keys/IDs, passed as a string, eg. "Employee_ID"

target_prop_name

The name for the new column to be added to the target data.frame containing the values, passed as a string, eg. "Employee_Name"

Details

This handles a join to enhance one data.frame that contains a column of keys/IDs from another data.frame that contains columns of key-value pairs. For example, to lookup names by reference to ID numbers.


brendan-newlon/df2neo4j documentation built on Sept. 19, 2020, 5:44 a.m.