liply {imager}R 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

[Package imager version 1.0.2 Index]