Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

map_il

Type-stable map for use with the purrr package


Description

Works like purrr::map, purrr::map_dbl and the like but ensures that the output is an image list.

Usage

map_il(...)

map2_il(...)

pmap_il(...)

Arguments

...

passed to map

Value

an image list

Functions

  • map2_il: Parallel map (two values)

  • pmap_il: Parallel map (multiple values)

Author(s)

Simon Barthelme

Examples

#Returns a list
imsplit(boats,"x",2) %>% purrr::map(~ isoblur(.,3))
#Returns an "imlist" object
imsplit(boats,"x",2) %>% map_il(~ isoblur(.,3))
#Fails if function returns an object that's not an image
try(imsplit(boats,"x",2) %>% map_il(~ . > 2))
#Parallel maps
map2_il(1:3,101:103,~ imshift(boats,.x,.y))
pmap_il(list(x=1:3,y=4:6,z=7:9),function(x,y,z) imfill(x,y,z))

imager

Image Processing Library Based on 'CImg'

v0.42.10
LGPL-3
Authors
Simon Barthelme [aut], David Tschumperle [ctb], Jan Wijffels [ctb], Haz Edine Assemlal [ctb], Shota Ochi [cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.