lsma is an R package designed to perform multi-scale landscape analysis. It provides tools to decouple nested spatial patterns and assess landscape metrics, helping landscape ecologists and conservation scientists analyze spatial data efficiently.
raster, sf, and lsma for handling spatial and raster data.future package.You can install the development version of lsma from GitHub:
Always check the line below:
# install.packages("devtools")
devtools::install_github("wilsonfrantine/lsma")
Three simple steps to analyze your data: 1. Load the raster data, sampling points and set your buffer sizes 2. Choose the best strategy for your experiment (coupled, decoupled, decouple_single) 3. Calculate the metric for each scale with calculate_metrics() from any landscapemetrics package function
library(lsma)
# Load example raster and points
r <- terra::rast(system.file("extdata/raster.grd", package = "lsma"))
p <- terra::vect(sf::st_read(system.file("extdata/pnts.shp", package = "lsma"), quiet = TRUE))
# Extract landscapes
ls <- extract_landscapes(r, p, buffers = c(500, 1000, 2000), strategy = "nested")
# Visualize
view_ls(ls)
# Calculate metrics
metrics <- calculate_metrics(ls, metric = "pland", level = "class")
# Fit models
models <- multimodel(metrics, bio_data = data_frame, model_type = "lm", model_formula = "responses ~ predictors")
The package also has functions to plot the extracted landscapes for visual check and publication.
If you use the lsma package in your research, please cite it as follows:
Frantine-Silva, W. (2024). lsma: A package for landscape structure multi-scale analysis. R package version 0.4.0. https://doi.org/10.5281/zenodo.13997058
BibTeX citation:
@Manual{,
title = {lsma: A package for landscape structure multi-scale analysis},
author = {Wilson Frantine-Silva},
year = {2024},
note = {R package version 0.4.0},
doi = {10.5281/zenodo.13997058},
url = {https://doi.org/10.5281/zenodo.13997058}
}
This is a preview version. If you encounter any bugs or issues, please report them on the GitHub issue tracker, or contact me at wilsonfrantine@gmail.com.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.