Nothing
knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
oo <- getOption("rmarkdown.html_vignette.check_title") on.exit(options(rmarkdown.html_vignette.check_title = oo)) options(rmarkdown.html_vignette.check_title = FALSE) library(MigConnectivity)
The MigConnectivity package, which quantifies the strength of migratory connectivity, was developed to facilitate quantitative comparisons of migratory connectivity across studies, data types, and taxa while accounting for uneven sampling and the bias inherent to different data types for studying migratory movement. Below, we use the new diffMC
function to compare MC estimates for the Yellow Warbler and the Ovenbird. To streamline the vignette and to avoid redundancy we load the results from the estStrength and the Worked Example vignettes.
set.seed(1234) data(OVENdata) newDir <- tempdir() baseURL <- 'https://github.com/SMBC-NZP/MigConnectivity/blob/devpsi2/data-raw/' file.name <- "OVENpsi.rds" url1 <- paste0(baseURL, file.name, '?raw=true') temp <- paste(newDir, file.name, sep = '/') utils::download.file(url1, temp, mode = 'wb') OVENpsi <- readRDS(temp) unlink(temp) OVEN_mc <- estStrength(originDist = OVENdata$originDist, targetDist = OVENdata$targetDist, originRelAbund = OVENdata$originRelAbund, psi = OVENpsi, nSamples = 5000, verbose = 0)
# Read in the estStrength results for OVEN OVEN_mc <- readRDS("OVENmc.rds") # Read in the estStrength results for YEWA YEWA_mc <- readRDS("YEWAmc.rds")
# Read in the estStrength results for YEWA newDir <- tempdir() baseURL <- 'https://github.com/SMBC-NZP/MigConnectivity/blob/devpsi2/data-raw/YEWA/' file.name <- "YEWAmc.rds" url1 <- paste0(baseURL, file.name, '?raw=true') temp <- paste(newDir, file.name, sep = '/') utils::download.file(url1, temp, mode = 'wb') YEWA_mc <- readRDS(temp) unlink(temp)
diffStrength(estimates = list(Ovenbird = OVEN_mc, Yellow_Warbler = YEWA_mc))
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.