export: Export ctmm data formats

exportR Documentation

Export ctmm data formats

Description

Functions to export ctmm data formats into common sp, sf, raster, and ESRI formats.

Usage

as.sf(x,error=FALSE,...)

## S4 method for signature 'UD'
raster(x,DF="CDF",...)

## method for class 'telemetry'
SpatialPoints.telemetry(object,...)

## method for class 'telemetry'
SpatialPointsDataFrame.telemetry(object,...)

## method for class 'telemetry'
SpatialPolygonsDataFrame.telemetry(object,level.UD=0.95,...)

## method for class 'UD'
SpatialPolygonsDataFrame.UD(object,convex=FALSE,level.UD=0.95,level=0.95,...)

## S4 method for signature 'UD,character'
writeRaster(x,filename,format,DF="CDF",...)

## S4 method for signature 'list,character'
writeVector(x,filename,...)

## S4 method for signature 'list,missing'
writeVector(x,filename,...)

## S4 method for signature 'telemetry,character'
writeVector(x,filename,filetype="ESRI Shapefile",error=TRUE,level.UD=0.95,...)

## S4 method for signature 'telemetry,missing'
writeVector(x,filename,filetype="ESRI Shapefile",error=TRUE,level.UD=0.95,...)

## S4 method for signature 'UD,character'
writeVector(x,filename,filetype="ESRI Shapefile",convex=FALSE,level.UD=0.95,level=0.95,
            ...)

## S4 method for signature 'UD,missing'
writeVector(x,filename,filetype="ESRI Shapefile",convex=FALSE,level.UD=0.95,level=0.95,
            ...)

Arguments

x

telemetry or UD object.

error

Export telemetry location error circles/ellipses as polygons if TRUE.

object

telemetry or UD object.

convex

Export convex coverage areas if TRUE. By default, the highest density regions (HDRs) are exported.

level.UD

Coverage level of the UD area. I.e., the 50% core home range would be given by level.UD=0.50.

level

Confidence level for the magnitude of the above area. I.e., the 95% CI of the core home range area.

DF

Rasterize the probability density function "PDF", probability mass function "PMF", or cumulative distribution function "CDF".

filename

Character name of file for raster or vector file.

format

Output file type (see writeFormats). If this argument is not provided, it is inferred it from the filename extension. If that fails, the default 'raster' format is used, which can be changed using rasterOptions.

filetype

A file format associated with a GDAL "driver". See gdal(drivers=TRUE) or the GDAL docs. If filetype=NULL, the filetype is inferred from the filename extension.

...

Optional arguments passed to writeRaster, writeVector, etc..

Details

as.sf exports ctmm objects to the sf format. Arguments to ctmm Spatial* export functions can also be used, such as level.UD and level.

raster exports UD object point-estimates distribution functions (DF) to raster objects. DF="PDF" gives the average probability density per cell, DF="PMF" gives the total probability per cell, and DF="CDF" gives the cumulative probability.

Spatial* functions export ctmm objects to sp formats.

writeRaster writes a raster file to disk, with pixel values corresponding to the distribution function DF.

writeVector writes a shapefile to disk, with UD polygons corresponding to the low-CI, point-estimate, and high-CI home-range area estimates.

Value

as.sf returns an sf object for the input points or polygons, with individual identity and other information retained.

raster returns a raster of the point-estimate distribution function DF, given a UD object.

SpatialPoints.telemetry returns a single spatialPoints object for the x-y locations, without individual identity and other information retained.

SpatialPointsDataFrame.telemetry returns a SpatialPointsDataFrame with the individual identities and other data recorded in the data frame retained.

SpatialPolygonsDataFrame.telemetry returns a SpatialPolygonsDataFrame that encodes the location estimate's error circles/ellipses.

SpatialPolygonsDataFrame.UD returns a SpatialPolygonsDataFrame of the low-CI, point-estimate, and high-CI home-range area estimates, in the appropriate order for plotting.

Author(s)

C. H. Fleming and K. Safi.

See Also

akde, as.telemetry, occurrence.


ctmm documentation built on Sept. 24, 2023, 1:06 a.m.