grapes-greater-than-grapes: envelop a function in another

%>%R Documentation

envelop a function in another

Description

This is intended to help with apply statements, where one may want to pass a function that simply wraps one function in another

Usage

f %>% g

Arguments

f

the inner funtion

g

the outer function

a

new function that simply wraps the inner inside the outer function

Examples

#an example matrix with some NA values in it
mat <- sample(c(NA,1:5),100,replace=TRUE)|>matrix(nrow=20)
#find all rows that don't have NA values in them
cleanRows <- apply(mat, 1, is.na %>% any %>% `!`)

jweile/yogitools documentation built on May 11, 2023, 7:42 p.m.