declarativeApply: Declarative Apply

Description Usage Arguments Examples

Description

Apply functions over lists

Usage

1
2
3
x %>lapply% y

x %>sapply% y

Arguments

x

input list

y

function

Examples

1
2
3
4
5
6
7
8
# Input:
input <- list(a = c(1,2,3),       
              b = c(4,4,5), 
              c = c(1,2,3,4,5))


# Chain lapply and sapply:
input %>lapply% sum %>sapply% sqrt

davidmacro/declarativeR documentation built on Sept. 18, 2021, 7:21 p.m.