knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of {pathroutr}
is to provide functions for re-routing paths that cross land
around barrier polygons. The use case in mind is movement paths derived from location
estimates of marine animals. Due to error associated with these locations it is
not uncommon for these tracks to cross land. The {pathroutr}
package aims to provide
a pragmatic and fast solution for re-routing these paths around land and along an
efficient path. It is important to note any re-routed paths are not statistical models
and may have unintended consequences and biases associated with them that depends on the
study animal, study area, and error nature of the original data. Re-routed paths may
also exceed the speed or physiological capabilities of the study species.
We believe this is the first implementation of visibility graphs within R for spatial routing. However, three sources were of key importance to developing the approach
In addition, both the {sf}
and {sfnetworks}
R packages are of key importance to the
functionality within {pathroutr}
. A special acknowledgement for the {stplanr} package
is also warranted as early development versions relied on {stplanr} functions. And,
of course, all of this would not be possible without the {igraph} package
{pathroutr}
is currently not available on CRAN and also requires R >= 4.0. Please
upgrade your version of R, if needed, before proceeding. Future versions of
{pathroutr}
may support pre-4.0 versions of R. But, for now, only 4.0+ is supported.
Starting with v0.2.1, {pathroutr}
is available via R-Universe.
# Install new pathroutr version from my R-Universe repository install.packages("pathroutr", repos = "https://jmlondon.r-universe.dev")
You can also add my repository to your local list of repositories in your
.Rprofile and this will ensure update.packages()
pulls any new releases
of {pathroutr}
#install.packages("usethis") usethis::edit_r_profile() # add the following text or replace existing repos option options(repos = c(jmlondon = 'https://jmlondon.r-universe.dev', CRAN = 'https://cloud.r-project.org'))
The development version of {pathroutr}
is available from
GitHub with:
# install.packages("remotes") remotes::install_github("jmlondon/pathroutr")
{pathroutr}
is highly dependent upon the {sfnetworks}
and {sf}
packages.
Both are available on CRAN.
Please note that the minimum supported version of {sf}
is 0.9. So, this might also be a
good time to check and update your {sf}
package versions.
Core packages from the tidyverse
({dplyr}
, {purrr}
, and {tibble}
) are also
required.
Please note that the pathroutr project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
We strongly encourage you to file Issues
and submit Pull Requests so we can ensure the
package meets the community needs and functions reliably. Please, please, please do your
best to create a reproducible example and use the
{reprex}
package to share code within your Issue.
Also, we have enabled the Discussion option within the GitHub repository for questions, thoughts, and ideas that may not qualify as an Issue or Pull Request.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.