rarify: Rarify Depth Data

View source: R/rarify.R

rarifyR Documentation

Rarify Depth Data

Description

Reduce density of mapped depth data to improve accuracy and computation time.

Usage

rarify(outline, df, x, y, z, res = 10, crsUnits = "dd")

Arguments

outline

shapefile outline of a waterbody

df

dataframe of coordinates and depths for a given waterbody

x

character giving name of longitude column

y

character giving name of latitude column

z

character giving name of depth column

res

number describing by how much to increase point resolution, default = 10

crsUnits

character describing CRS units of input outline, either "dd" (decimal degrees) or "m" (meters), default = "dd"

Value

dataframe of rarified xyz coordinates

Author(s)

Sean Bertalot & Tristan Blechinger, Department of Zoology & Physiology, University of Wyoming

Examples

#load test data
outline <- terra::vect(system.file("extdata", "example_outline.shp", package = 'rLakeHabitat'))
depths <- read.csv(system.file("extdata", "example_depths.csv", package = 'rLakeHabitat'))
#run function
rarify(outline = outline, df = depths, x = "x", y = "y", z = "z", res = 100, crsUnits = "dd")

rLakeHabitat documentation built on April 16, 2025, 1:10 a.m.