View source: R/do.combine.cols.R
do.combine.cols | R Documentation |
This function allows you to combine the values of two columns, with an option to remove any 'NA' values
do.combine.cols(dat, col1, col2, na.rm)
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. |
Returns a data.table with adjusted columns
Thomas M Ashhurst, thomas.ashhurst@sydney.edu.au
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.