relabel_na: Relabel samples containing 'NA' as outside any interest area

Description Usage Arguments Value Examples

View source: R/ias.R

Description

relabel_na examines interest area columns (LEFT_INTEREST_AREA_ID, RIGHT_INTEREST_AREA_ID, LEFT_INTEREST_AREA_LABEL, and RIGHT_INTEREST_AREA_LABEL) for cells containing NAs. If NA, the missing values in the ID columns are relabeled as 0 and missing values in the LABEL columns are relabeled as 'Outside'.

Usage

1
relabel_na(data, NoIA = NULL)

Arguments

data

A data table object output by prep_data.

NoIA

A positive integer indicating the number of interest areas defined when creating the study.

Value

A data table with the same dimensions as data.

Examples

1
2
3
4
5
6
## Not run: 
library(VWPre)
# To relabel the NAs...
df <- relabel_na(data = dat, NoIA = 4)

## End(Not run)

VWPre documentation built on Nov. 30, 2020, 1:08 a.m.