filter: Function to discard subsets of an array (NA or drop)

View source: R/filter.r

filterR Documentation

Function to discard subsets of an array (NA or drop)

Description

Function to discard subsets of an array (NA or drop)

Usage

filter(X, along, FUN, subsets = base::rep(1, dim(X)[along]),
  na.rm = FALSE)

Arguments

X

An n-dimensional array

along

Along which axis to apply FUN

FUN

Function to apply, needs to return TRUE (keep) or FALSE

subsets

Subsets that should be used when applying FUN

na.rm

Whether to omit columns and rows with NAs

Value

An array where filtered values are NA or dropped


mschubert/narray documentation built on Jan. 12, 2023, 8:26 a.m.