mergeCols: Merges one column from 'sourceDF' into 'df'

View source: R/watanabe-df-manipulation.R

mergeColsR Documentation

Merges one column from sourceDF into df

Description

Merges one column from sourceDF into df based on teh common index of the two data frames

Usage

mergeCols(df, sourceDF, colName, dfIndex = "index", sourceIndex = "index",
  destName = colName)

Arguments

df

Data frame to receive column

sourceDF

Data frame containing column

colName

String. Name of column in sourceDF to merge into df

dfIndex

String. Name of index column in df to merge on . Must uniquely identify each row in df and have a one to one correspondence with sourceIndex.

sourceIndex

String. Name of index column in sourceDF to merge on. Must uniquely identify each row in sourceDF and have a one to one correspondence with dfIndex.

destName

String. Name column should take when merged into df.

Value

The data frame df containing colName from sourceDF named as destName.


awatanabe/appr documentation built on Sept. 26, 2022, 8:04 a.m.