set_values_to_na: Set values in dataframe columns to NA

Description Usage Arguments Value Examples

View source: R/fillgaze-package.R

Description

Set values in dataframe columns to NA

Usage

1

Arguments

data

a dataframe of eyetracking data

...

predicate functions that return true whenever a value should be replaced with NAs. The functions should be named, so that the argument var1 = is.finite would replace all the values in the column var1 where is.finite() returns TRUE with 'NA“ values. These predicate functions can be defined using the formula syntax for anonymous functions.

Value

a modified copy of the dataframe

Examples

1
2
is_zero <- function(x) x == 0
set_values_to_na(mtcars, cyl = ~ .x == 6, vs = is_zero)

tjmahr/fillgaze documentation built on May 23, 2019, 7:36 a.m.