Learn R Programming

ursa (version 3.11.1)

is.na: ‘No data’ values for raster images.

Description

The "Extract" function is.na creates mask for each band. In this mask value 1L corresponds to NA value in the source image, and value NA corresponds non-missing values in the source image. The "Replacement" function is.na<- assigns numerical value for cells with ‘no data’ value.

Usage

# S3 method for ursaRaster
is.na(x)

# S3 method for ursaRaster is.infinite(x)

# S3 method for ursaRaster is.nan(x)

# S3 method for ursaRaster is.na(x) <- value

Value

"Extract" functions is.na, is.infinite, is.nan return object of class ursaRaster.

"Replacement" function is.na<- modifies object of class ursaRaster.

Arguments

x

Object of class ursaRaster

value

Numeric.

Author

Nikita Platonov platonov@sevin.ru

Details

These functions are corresponded to local operators of map algebra.

Examples

Run this code
session_grid(NULL)
session_grid(regrid(mul=1/4))
a <- ursa_dummy(nband=2,min=0,max=100)
print(a)
print(is.na(a))
a2 <- ursa_new(nband=2)
print(a2)
print(is.na(a2))
a3 <- a
a3[a3<30 | a3>70] <- NA
print(a3)
print(is.na(a3))
is.na(a3) <- 200
print(a3)

Run the code above in your browser using DataLab