R-CMD-check codecov lifecycle CRAN status DOI:10.1111/2041-210X.13076

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

landscapetools

landscapetools provides utility functions for some of the less-glamorous tasks involved in landscape analysis:

Utilities:

Visualization

Themes:

Installation

You can install the released version from CRAN with:

install.packages("landscapetools")

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("ropensci/landscapetools")

Utilities

library(landscapetools)

Classify

# Classify the landscape into land uses
classified_landscape <- util_classify(fractal_landscape,
                                      n = 3,
                                      level_names = c("Land Use 1", 
                                                      "Land Use 2",
                                                      "Land Use 3"))

show_landscape(classified_landscape, discrete = TRUE)

Merge

# Merge all landscapes into one
merged_landscape <- util_merge(fractal_landscape,
                               c(gradient_landscape, random_landscape),
                               scalingfactor = 1)

# Plot an overview
merge_vis <- list(
    "1) Primary" = fractal_landscape,
    "2) Secondary 1" = gradient_landscape,
    "3) Secondary 2" = random_landscape,
    "4) Result" = merged_landscape
)

show_landscape(merge_vis)

See also

In the examples above we make heavy use of the NLMR package. Both packages were developed together until we split them into pure landscape functionality and utility tools. If you are interested in generating neutral landscapes via a multitude of available algorithms take a closer look at the NLMR package.

Meta

ropensci_footer



ropensci/landscapetools documentation built on Oct. 12, 2022, 6:19 p.m.