do.combine.cols: do.combine.cols - Combine the values of two columns into a...

View source: R/do.combine.cols.R

do.combine.colsR Documentation

do.combine.cols - Combine the values of two columns into a single column

Description

This function allows you to combine the values of two columns, with an option to remove any 'NA' values

Usage

do.combine.cols(dat, col1, col2, na.rm)

Arguments

dat

NO DEFAULT. Data.table.

col1

NO DEFAULT. Name of the column you want to combine into.

col2

NO DEFAULT. Name of the column you want to combine from. This column will be deleted after combination into col1.

na.rm

DEFAULT = TRUE. If NA values are present in the columns, they will be removed.

Value

Returns a data.table with adjusted columns

Author(s)

Thomas M Ashhurst, thomas.ashhurst@sydney.edu.au


ImmuneDynamics/Spectre documentation built on Nov. 12, 2023, 8:12 a.m.