Learn R Programming

powerHaDeX (version 1.0)

add_column: Complete data frame with columns

Description

This function adds column if does not exist and fill it with provided value.

Usage

add_column(data, col_name, value = NULL)

Arguments

data

a data frame of interest.

col_name

a character. Name of column that should be created if it does not exist

value

optional. A value to fill with.