fix_dups: NA replacement in duplicated columns

Description Usage Arguments Value Examples

View source: R/fix_dups.R

Description

fix_dups creates a data.frame where duplicated columns with a specific suffix are row-wise gone through, and where there is NA in the original column, the suffixed column's data is placed there instead.

Usage

1
fix_dups(data, suffix, remove = T)

Arguments

data

A data.frame or tibble.

suffix

A single string with column suffix to look for.

remove

logical. If column with suffix are to be removed.

Value

a data frame with added/replaced age and timepoint variables.

Examples

1
2
3
4
## Not run: 
fix_dups(data, suffix="YY")

## End(Not run)

LCBC-UiO/MOAS documentation built on Dec. 21, 2018, 7:13 p.m.