Learn R Programming

imager (version 0.14)

idply: Split an image along axis, apply function, return a data.frame

Description

Shorthand for imsplit followed by ldply

Usage

idply(im, axis, fun, ...)

Arguments

im
image
axis
axis for the split (e.g "c")
fun
function to apply
...
extra arguments to function fun

Examples

Run this code
parrots <- load.image(system.file('extdata/parrots.png',package='imager'))
idply(parrots,"c",mean) #mean luminance per colour channel

Run the code above in your browser using DataLab