Free Access Week-  Data Engineering + BI
Data engineering and BI courses are free!
Free AI Access Week from June 2-8

amber (version 1.0.3)

intFun.bin: Make bins

Description

This function converts values into bins.

Usage

intFun.bin(x, bin)

Arguments

x

A raster object

bin

A number

Value

A raster object with binned values

Examples

Run this code
# NOT RUN {
library(raster)
data <- raster::raster(matrix(runif(100,0,100), ncol=10))
my.bin <- 25
# convert values to bins
bins <- intFun.bin(data, my.bin)
# plot data
plot(data);text(data)
plot(bins); text(bins)

# }

Run the code above in your browser using DataLab