applyna: Apply is.na to vector in margin of array or matrix

Description Usage Arguments Examples

Description

Apply is.na to vector in margin of array or matrix

Usage

1
applyna(x, mar = 2, FUN = I)

Arguments

x

array, matrix, or data.frame

mar

margin: 1=rows, 2=columns, etc.

FUN

function to be applied to is.na(vector), where vector is the vector of x implied by mar. Default is I, returning a logical vector.

Examples

1
2
3
4
x <- matrix(5,5,5)
x[2,3] <- NA
applyna(x,2)
applyna(x,2,mean)

patr1ckm/patr1ckm documentation built on May 24, 2019, 8:21 p.m.