add_to_dataframe: Join a dataframe and a named vector

View source: R/add_to_dataframe.R

add_to_dataframeR Documentation

Join a dataframe and a named vector

Description

FUNCTION_DESCRIPTION

Usage

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

join


jlaffy/scalop documentation built on March 24, 2024, 9 a.m.