fix_dups: NA replacement in duplicated columns

View source: R/fix_dups.R

fix_dupsR Documentation

NA replacement in duplicated columns

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

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

## Not run: 
fix_dups(data, suffix="YY")

## End(Not run)


LCBC-UiO/MOAS documentation built on Aug. 28, 2023, 3:29 a.m.