FUNCTION_DESCRIPTION

add_to_dataframe(dat, vec, by, newcol = "val")

Arguments

dat

dataframe

vec

named vector whose names are a column of the dataframe

by

the name of the column that joining should be performed on.

newcol

the name of the new column to add from vec. Default: 'val'

Value

dataframe with the same number of rows as 'dat' and an additional column corresponding to the values of 'vec'.

See also