CBinterp: Interpolate variables over the Chesapeake Bay

Description Usage Arguments Details Value See Also Examples

View source: R/CBinterp.R

Description

CBinterp interpolates Lat-Long georeferenced data across the surface of the Chesapeake.

Usage

1
CBinterp(data, coordinates, res = 2)

Arguments

data

Data frame or Numeric. Vector of water quality values.

coordinates

Numeric. Vector of Long/Lat locations of provided data.

res

Numeric. Resolution of the desired interpolated values in kilometers.

Details

This function converts long-lat data to UTM-referenced data, interpolates across a grid of the required resolution, and returns the interpolated values as long-lat-referenced data.

Value

This function returns an object of class SpatialPointsDataFrame. Data slot contains columns of longitude, latitude, interpolated value at that location, and the standard error of the interpolated value.

See Also

chesapeake

Examples

1
2
3
4
5
6
7
coords <- matrix(c(seq(-77.4, -75.5, length.out = 1000),
                        seq(36.7, 39.4, length.out = 1000)), ncol = 2)
coords <- apply(coords, 2, sample, size = 100)
fake.data <- rnorm(100, 15, 2)
resolution <- 2
interpolated <- CBinterp(data = fake.data, coordinates = coords,
                         res = resolution)

mhpob/TelemetryR documentation built on Sept. 28, 2020, 11:33 a.m.