Last data update: 2014.03.03

R: Relabel samples containing 'NA' as outside any interest area
relabel_naR Documentation

Relabel samples containing 'NA' as outside any interest area

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

relabel_na(data = data, NoIA = NoIA)

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

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

## End(Not run)

Results