Learn R Programming

imager (version 0.45.8)

liply: 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

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

Run the code above in your browser using DataLab