fb_set_missing: Set trait values to NA

Description Usage Arguments Value Examples

View source: R/fb_set_missing.R

Description

Sets observations to missing (NA) for specified traits

Usage

1
fb_set_missing(fbt, traits, unique_ids)

Arguments

fbt

A Field Book Table object.

traits

A character vector of traits for which values should be set to missing. Defaults to all traits.

unique_ids

A character vector of unique identifiers for which observations should be set to missing.

Value

An fbt object with the specified observations set to missing (i.e. NA)

Examples

1
2
3
4
5
6
7
8
data("fbt_sample")

# Detect the outlier in the 'OneOutlier' trait using 'fb_outliers()'
outliers <- fb_outliers(fbt = fbt_sample, traits = "OneOutlier")

# Set this outlier to NA
fbt1 <- fb_set_missing(fbt = fbt_sample, traits = "OneOutlier", unique_ids = "13RPN00010")
 

neyhartj/fbutils documentation built on Feb. 10, 2020, 1:45 p.m.