extract_isopredictions: Add the isomap prediction and sd in columns attached to the...

Description Usage Arguments Examples

View source: R/isotope-maneuvers.R

Description

Rasterizes the isomap predictions and standard deviation (using isomap2raster) and then extracts the values associated with each location from the raster and returns the full data frame with those values joined on in columns named iso_pred and iso_sd. It overwrites those columns with a warning if either of those columns already exists in the data.

Usage

1
extract_isopredictions(isoscape, birds, pred = "predkrig", sd = "stdkrig")

Arguments

isoscape

the data frame of prediction.txt from ISOMAP. The latitude column must be named "lat" and the longitude column must be named "long".

birds

data frame of the individual isotope values for the birds/feathers. Should be something like breeding_wiwa_isotopes.

pred

name of the column holding the prediction (like "predkrig") in the isoscape data frame

sd

name of the column holding the standard deviation (like "stdkrig") in the isoscape data frame

Examples

1
2
3
4
5
6
# Using the provided data from breeding Wilson's warblers and the provided
# predictions from isomap_job54152:
x <- extract_isopredictions(isoscape = isomap_job54152_prediction,
                       birds = breeding_wiwa_isotopes,
                       pred = "predkrig",
                       sd = "stdkrig")

gaiah documentation built on July 8, 2020, 6:12 p.m.