drop_na_columns: Remove variables with NA values.

Description Usage Arguments Value Examples

View source: R/drop_na_columns.R

Description

drop_na_columns returns list of variables which have greater than a specified threshold number of NAs.

Usage

1
drop_na_columns(population, variables, cutoff = 0.05)

Arguments

population

tbl with grouping (metadata) and observation variables.

variables

character vector specifying observation variables.

cutoff

threshold between [0,1]. Variables with an NA frequency > cutoff are returned.

Value

character vector specifying observation variables to be excluded.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
population <- tibble::tibble(
  Metadata_group = c(
    "control", "control", "control", "control",
    "experiment", "experiment", "experiment", "experiment"
  ),
  Metadata_batch = c("a", "a", "b", "b", "a", "a", "b", "b"),
  AreaShape_Area = c(10, 12, 15, 16, 8, 8, 7, 7),
  AreaShape_Length = c(2, 3, NA, NA, 4, 5, 1, 5)
)
variables <- c("AreaShape_Area", "AreaShape_Length")
drop_na_columns(population, variables)

cytominer documentation built on July 8, 2020, 5:08 p.m.