terra2im: convert at terra raster to a spatstat image taken from...

View source: R/spatial_utils.R

terra2imR Documentation

convert at terra raster to a spatstat image taken from maptools and converted to terra

Description

convert at terra raster to a spatstat image taken from maptools and converted to terra

Usage

terra2im(rast, factor.col.name = NULL)

Arguments

rast

rast A terra raster to convert to a spatstat image

factor.col.name

string Names of factors in the raster to convert to window

Examples

library(ppmData)
library(terra)
path <- system.file("extdata", package = "ppmData")
lst <- list.files(path=path,pattern='*.tif',full.names = TRUE)
covariates <- rast(lst[1])
im.r <- terra2im(covariates)

plot(im.r)

skiptoniam/qrbp documentation built on May 13, 2023, 2:08 a.m.