liply: Apply function to each element of a list, then combine the...

View source: R/splitcombine.R

liplyR Documentation

Apply function to each element of a list, then combine the result as an image by appending along specified axis

Description

This is just a shortcut for purrr::map followed by imappend

Usage

liply(lst, fun, axis, ...)

Arguments

lst

a list

fun

function to apply

axis

which axis to append along (e.g. "c" for colour)

...

further arguments to be passed to fun

Examples


build.im <- function(size) as.cimg(function(x,y) (x+y)/size,size,size)
liply(c(10,50,100),build.im,"y") %>% plot

imager documentation built on May 29, 2024, 1:38 a.m.