Learn R Programming

strvalidator (version 0.1)

addData: Adds new data columns to a data frame

Description

addData Adds columns in 'newData' to 'data' by column 'byCol'.

Usage

addData(data, newData, byCol, exact = TRUE)

Arguments

newData
Data frame containing information you want to add to 'data'.
data
Data frame containing your main data.

Value

  • data.frame the original data frame containing additional columns.

Details

Information in columns in data frame 'newData' is added to data frame 'data' based on value in column 'byCol'.

Examples

Run this code
# Get marker names for Promega PowerPlex ESX 17.
x <- data.frame(Marker = getKit("ESX17")$locus)
# Get offsets for Promega PowerPlex ESX 17.
y <- data.frame(Marker = getKit("ESX17")$locus, Offset = getKit("ESX17")$offset)
# Get other kit information using string name.
z <- addData(data=x, newData=y, byCol="Marker")
print(x)
print(y)
print(z)

Run the code above in your browser using DataLab