Learn R Programming

multifluo (version 1.1)

binning: Bins the pixels

Description

Reduces the size of an image by binning the pixels.

Usage

binning(dataset, n.bin, fun = "mean")

Arguments

dataset

The dataset to be binned (in a matrix form)

n.bin

number of pixels to be binned (a natural number)

fun

if "mean", the value of the binned pixel is the average of the values of the initial pixels if "sum", the value of the binned pixel is the sum of the values of the initial pixels

Value

The binned dataset

Examples

Run this code
# NOT RUN {
data(gp)
binning(gp,2)
# }

Run the code above in your browser using DataLab