intFun.grid.na: Replace NA with zero in raster object

Description Usage Arguments Value Examples

View source: R/intFun.R

Description

This function sets all NA's in a raster object to zero.

Usage

1

Arguments

x

A raster object

Value

A raster object where all NA's have been replaced with zero

Examples

1
2
3
4
5
6
7
8
library(raster)
# create a raster object with NA
data <- c(runif(99,-10,10),NA)
data <- matrix(data, ncol=10)
data <- raster::raster(data)
# replace NA with zero in raster object
data <- intFun.grid.na(data)
plot(data); text(data)

amber documentation built on Aug. 28, 2020, 5:08 p.m.