Introduction

Countless studies on environmental and biological sciences require the delimitation of landscapes. There is not a single definition for landscape (Turner and Gardner 2015), although there is agreement that spatial pattern or heterogeneity and spatial scale are key concepts within the discipline of landscape ecology (Wu 2007, 2013). A landscape can be defined at diverse spatial scales (from a few square meters to hundreds of kilometers) or shaped with different forms (circles, squares or even arbitrarily shaped according to political boundaries). Yet, from a strictly technical point of view, one can simply define a landscape as a buffer area, typically circular, of a fixed radius around a geographical point location (Brennan et al. 2002). This methodological definition of landscape has been widely used among landscape ecology studies for the past years (e.g. Anderle et al. 2023; Faria et al. 2023; Hämäläinen et al. 2023; Parra-Sanchez and Edwards 2024). Selecting landscapes within a study region is a key step for any project aiming to characterize the attributes of a region (e.g. forest amount, forest fragmentation, landscape heterogeneity, etc.) or to assess the effect of certain landscape attributes on a response variable of interest. This is the case, for instance, of studies measuring the relationship between biodiversity (e.g. species richness or abundance of a given species) and the amount of natural habitat in the landscape (e.g. Melo et al. 2017; Galán-Acedo et al. 2018; Verga et al. 2021).

The selection of the spatial scale can influence the results of a study (Wu 2007; Wheatley and Johnson 2009; Jackson and Fahrig 2012, 2015). Ecological responses act at different spatial scales and, if species are involved, the selected scale depends on the biology of the studied species. One common approach to studying the link between ecological processes and scale is to evaluate multiple spatial scales. For circular-shaped landscapes, this can be achieved by generating multiple buffers of increasing radii from the central point of the landscape (Brennan et al. 2002) (Fig. 1). Then, one or more response variables are measured at each landscape of different area, and results can be discussed at the context of multiple spatial scales. Usually, it is desirable to select a scale of effect through some statistical approach, given a set of evaluated spatial scales and a given response variable (Jackson and Fahrig 2012; Huais 2018). The scale of effect would indicate the spatial scale at which the response variable exhibits the strongest relationship with the evaluated landscape attribute, supported by the strongest statistical model (e.g. the model with the highest R2 value or the lowest value for the Akaike Information Criterion) (Huais 2018).

Fig. 1
figure 1

Example of a landscape at multiple spatial scales. Buffers of sequentially bigger radii (black circles) are generated around a central point of interest. Colors refer to different land covers (e.g. forest, crops, urban, etc.)

Another important aspect of every landscape-scale study lies in an optimal selection of the set of landscapes that will be evaluated. Depending on the research question and on the proposed experimental design, the geographical locations might be selected to get landscapes that fulfill certain conditions. For example, if the goal of the study is to evaluate the relationship of a given response variable with a landscape metric (e.g. the abundance of pest birds in relation to the amount of forest; Verga et al. 2021), a good experimental design would require that the points are selected in order to get landscapes that comprise a gradient with wide-range values of the landscape metric of interest (i.e. a complete range including low, medium and high values). More complex experimental designs may require gradients of landscapes where certain metrics exhibit low or null correlation, to statistically pull apart the differential effects of distinct landscape metrics. For instance, De Camargo et al. (2018) tested the relationship between avian richness and the number of forest patches (as a measure of habitat fragmentation) but maintaining constant the amount of habitat in the selected landscapes.

Beyond the particularities of each study, the calculation of landscape metrics is a crucial step, and can involve a more complex workflow if the study involves a multi-scale analysis (Fig. 1). Several methods and software are available for the delimitation of landscapes to be studied, as well as for the calculation of metrics. Geographical Information Systems (GIS) such as QGIS (QGIS Development Team 2009) comprise the primary software for these tasks, which allows the preprocessing, analysis and visualization of geographical data, among numerous spatial-related tasks. There is also more specific software oriented to the calculation of diverse landscape metrics, ‘FRAGSTATS’ (McGarigal 1995) being the pioneering software for this task. Specific spatial-oriented packages and scripts are available by several programming languages, such as Python (McClain 2022) or Julia (Hoffimann 2023). Nevertheless, the popularity of the R language (R Core Team 2023) has been increasing in the past decades (Thieme 2018), and is probably the most popular language being used by ecologists nowadays (Lai et al. 2019). Several R packages are currently available for landscape-scale studies (Hesselbarth et al. 2021), such as the package landscapemetrics (Hesselbarth et al. 2019), which provides a tidy workflow for the calculation of numerous landscape metrics from an inputted raster layer.

Although the available R packages provide the necessary framework to conduct landscape-scale studies, this can often be overwhelming for inexperienced R users, or time-consuming for the more experienced ones. Tasks can be especially challenging if the study involves a multi-scale approach, this is, the generation of multiple landscapes at different spatial scales (Fig. 1), and the subsequent calculation of landscape metrics at each spatial scale. This paper introduces the R package multilandr, that builds on several spatial-oriented R packages and comprises a set of functions to process, visualize and analyze spatial data at a landscape-scale. The package provides utility functions to: (i) plot and analyze multi-scale landscapes, (ii) calculate and visualize correlations between metrics, (iii) plot the value of landscape metrics against increasing spatial scales, (iv) filter landscapes that fulfill certain conditions regarding their landscape metrics, (v) select landscapes that comprise gradients with a wide-range of values for a given metric, and (vi) prepare datasets for ulterior statistical tasks.

Software

The R package multilandr provides a toolbox to facilitate a typical workflow of landscape-scale studies. Figure 2 shows a synthesis of the package’s main functionalities. The primary function of the package is mland(), whose output is an R object of class ‘MultiLand’ (Table 1a). Among other inputs, this object is constructed by processing three main user inputs: a raster layer, a spatial points layer and a set of spatial scales. In a previous step, the user might generate a set of points according to certain user-defined rules with the function generate_points(). The object of class ‘MultiLand’ is the primary object of the package, as it comprises all buffers generated around the inputted points given the provided spatial scales, as well as the intersections between the provided raster layers and these buffers (i.e. the actual landscapes). Provided raster layers can represent different land covers (i.e. raster layers with discrete values) or depict continuous variables across the landscape (e.g. climate data, topographic data or other relevant spatial data). This object class serves as the main argument for other functions, including mland_plot() to visualize landscapes and buffers, and mland_overlap() to calculate the degree of overlapping between the different generated buffers.

Fig. 2
figure 2

Workflow of the main R functions provided by the package. Tasks orbit around objects of classes ‘MultiLand’ and ‘MultiLandMetrics’. The first contains all the relevant information and objects regarding landscapes and spatial scales, while the latter contains data related to the calculations of landscape metrics from a ‘MultiLand’ object

Table 1 Key arguments of functions mland() and mland_metrics(), the primary functions of the package

In the next step (Fig. 2), the class ‘MultiLand’ serves as the main input for the function mland_metrics(), which allows the calculation of diverse landscape metrics for each landscape at each specified spatial scale (Table 1b). This function mainly relies on the R package landscapemetrics (Hesselbarth et al. 2019), which allows the calculation of diverse landscape metrics, yet the output of this package is then adapted by multilandr for a more straightforward usage for multi-scale approaches. The default output of the function mland_metrics() is an object of class ‘MultiLandMetrics’, which is a mandatory object for other functions of the package. This object contains the data frame with the values of the metrics the user initially required to be calculated, for each landscape of a given site and spatial scale. The object of class ‘MultiLandMetrics’ serves as the main input for other functions programmed to: (i) select landscapes whose metrics present certain values provided by the user with metrics_filter(); (ii) select landscapes that comprise a gradient with wide-range values for a given landscape metric with metrics_gradient(); (iii) perform pairwise metric correlations and plots with metrics_corr() and metrics_plots(), respectively; (iv) generate scalograms, which are plots that relate the value of a given metric in relation to increasing spatial scales (radii) (e.g. Wu 2004); and (iv) prepare the data frame that contains the metric’ values for ulterior visual or statistical analyses with metrics_bind().

In the following section, we present two case studies that exemplify the functionality of the package, inspired by the generation of potential research questions. The first case study exhibits the workflow of a typical landscape-scale study that aim to assess biodiversity in a fragmented landscape, through the definition of an arbitrary landscape gradient. The second case study exhibits the workflow of a more rigorous experimental design, where hundreds of landscapes that fulfill certain conditions are generated. Full arguments of the presented functions can be explored by the user through the help page of each function in the R environment.

Case studies

Case study: exploring the relationship between landscape metrics and biodiversity

Common questions for a typical landscape ecology study focused on evaluating the effects of land use change on biodiversity are: (i) how does the processes of forest loss and fragmentation affect biodiversity? (ii) how does biodiversity respond at different spatial scales? and (iii) is there a spatial scale for which the studied species responds more strongly? To answer these questions, we first need to define a gradient of landscapes, from which one or more landscape metrics can be calculated. Also, research questions (i) and (ii) require performing this analysis at multiple spatial scales. Finally, we also might need to get relevant covariates, occurring across the studied landscapes, that could influence the response variable. Abundant scientific literature has explored these questions through similar methodological approaches (e.g. Melo et al. 2017; Galán-Acedo et al. 2018; Verga et al. 2021; Huais et al. 2024).

For this example, we introduce a potential experimental design geographically located at the southern portion of the Chaco ecoregion in Argentina, where landscapes of different spatial scales are generated from 15 different arbitrary sites. Primary inputs include: (i) raster layers from which landscape metrics will be calculated, and (ii) a vector layer with the geographical location of the sites that will delimit the landscapes to be generated. In this example, the main raster layer comprises a land cover layer from a clipped area of the South American Chaco ecoregion for the year 2000 (Project MapBiomas Chaco 2022). This main raster layer serves as the primary layer for the calculation of traditional landscape metrics from discrete values, as the ones provided by R package landscapemetrics (e.g. percentage of landscape, number of patches, mean patch size of a given raster class, etc.). In addition, we also provide a raster layer of the same extent, containing the mean values of the Normalized Difference Vegetation Index (NDVI) for the year 2000 (Landsat-7 image courtesy of the U.S. Geological Survey). Inputting continuous raster layers allows the calculation of other metrics suitable for continuous data (e.g. mean value or standard deviation). NDVI values are considered as a proxy of vegetation biomass (Rouse et al. 1974), probably influencing our variable of interest (richness of a given group of species), which is relevant in the context of the research questions raised in this case study.

The first steps load the raster and a vector layer with the 15 different geographical points with functions from the package terra (Hijmans 2023).

figure a

To easily identify each individual land cover (class) of the main raster layer (named “elchaco”), we assign a meaningful name for each raster class. The main raster layer with discrete values comprises six distinct classes.

figure b

Next, we generate a ‘MultiLand’ object with the function mland().

figure c

Mandatory inputs include at least one raster layer and a vector layer containing the geographical locations of sites. Main raster layers intended to be used for the calculation of traditional landscape metrics must be inputted in the argument rast_layer (in this example, the object named “elchaco”), whereas other raster layers intended to be used to perform other calculations must be inputted in the argument ext_rast_layer (in this example, the object named “elchaco_ndvi”). Also, we must define the spatial scales from which landscapes will be generated. In this case study, we define the spatial scales as follows: 1000 m until 5000 m, by 1000 m steps. This could be the case, for instance, of a study aiming to find the scale of effect of avian richness in relation to the amount of one or more land covers (e.g. Paton et al. 2019; Mao et al. 2023). Given that each point contained in the points vector layer has an associated name or id for ulterior identification, we provide the name of the attribute inside the points vector layer containing this information, by passing a string through the argument site_ref.

In addition, we input the names of the classes (inside argument class_names) and specify names for the raster layers (rast_names). At last, by setting the argument on_the_fly to FALSE, we are requesting the function to perform the intersections between the buffers (of radii equal to the inputted in argument radii) and the raster layers inputted in arguments rast_layer and/or ext_rast_layer. Thus, actual landscapes will be generated and stored in the output of the function. In the next case study, we show the advantages of generating a ‘MultiLand’ object with the argument on_the_fly equal to TRUE. Calling the generated object by its name provides basic information, including the number of raster layers, points and spatial scales.

An initial aspect we might want to know is the degree (%) of spatial overlapping between the different landscapes, for which the function mland_overlap() will do the task. This simply outputs a two-dimensional matrix with the percentage of overlap between buffers. Next, landscapes can be plotted for a quick visual inspection (Fig. 3), with the function mland_plot().

> mland_plot(ernesdesign, title = "sitename")

Fig. 3
figure 3

Output of the function mland_plot(), showing the plots of each landscape contained in a ‘MultiLand’ object, with their respective assigned names. These are the intersections between a provided raster layer and the specified buffers (from 1000 to 5000 m, by 1000 m steps), around each geographical site

Spatial objects contained inside a ‘MultiLand’ object (points, buffers and intersections between buffers and raster layers) can be exported as GIS data through mland_export_gis() for further investigation or plotting, such as through QGIS (QGIS Development Team 2009). The function will export a zip file containing points, buffers and the intersections between buffers and raster layers (actual landscapes). In addition, the ‘MultiLand’ object can be saved with the function mland_save(), and then loaded in a fresh R session with mland_load().

Once generated the ‘MultiLand’ object, we can calculate several landscape metrics through the function mland_metrics(). In this example, the function will calculate the percentage of the landscape ("pland") and the edge density ("ed") for each class (level = "class") of the main raster layers (raster layers with discrete values depicting different land covers) of ‘MultiLand’. In line with the research questions of this case study, these metrics act as measures of forest cover and forest fragmentation. The calculation of edge density is preferred among other metrics (such as the number of patches) because its value is not scale-dependent, a relevant aspect to consider if we are analyzing multiple spatial scales. Also, for the extra raster layers (argument ext_calc), in this case the function will calculate the mean values of the NDVI.

figure d

Some details regarding the inputted parameters need further explanation. On one side, the argument absence_values indicates the value that each class-level metric should acquire when a given class (land cover) is not present in each landscape (e.g. there are no urban areas in a given landscape). Given the nature of one of the metrics being calculated, the percentage of landscape for a given class, the value should equal zero in the absence of this class within each landscape. If this is not clarified, by default the value will be NA (absence of value). On the other side, a list must be provided in argument ext_calc, comprised by as many elements as required metrics, each element consisting in a vector of two internal elements: the first one defines the raster layer (within the extra raster layers provided in argument ext_raster, during the calling of mland() for the generation of an object of class ‘MultiLand’) and the second one the name of the function to be applied to the values of the landscapes for the specified raster layer. The required function can be a function of a loaded package (e.g. "mean" or "sd"), or a user-defined function from the R environment.

Numerous landscape metrics can be calculated, which can be specified through the arguments level, metric, name, type and/or what, the same required by the function calculate_lsm() from the landscapemetrics package (Hesselbarth et al. 2019). Specifications for each argument can be explored through the help page (?mland_metrics). Available landscape metrics can be explored through metrics_list().

By default, mland_metrics() outputs an object of class ‘MultiLandMetrics’. Calling the generated object by its name provides basic information regarding which metrics were calculated, for which layers, classes, points and radii. The most relevant element of this object is the data frame containing the values of the required metrics, which may be exported for further use by the user (Table 2). The data frame is mainly based on the output generated by the function calculate_lsm() from the package landscapemetrics, but rearranged for a multi-scale approach. Each row contains the value of a given metric for a given landscape around a central point from a given raster layer and radius (Table 2). If the required metric is a class-level metric, the class and the name of the class is informed under the columns “class” and “classname”. If the required metric is a patch-level metric, the id of the patch is informed under the column “patch_id”. The function also allows to output this data frame directly, but an object of class ‘MultiLandMetrics’ (the default output) can be passed to other functions of the package (Fig. 2).

Table 2 Arbitrary selection of a subset of rows from the data frame of metrics contained within the object of class ‘MultiLandMetrics’ named “ed_metrics”

A logical next step would be to associate these metrics to a data frame containing sampling data from each individual site (i.e. a data frame containing a column for the site identification and another column with the values of the measured response variable for each site). These metrics include those calculated for the main raster layers (land covers: the percentage of the landscape and edge density for each class) and for the extra raster layers (NDVI values). This can be accomplished through metrics_bind(), which generates a data frame, with the same rows and columns as the data frame with sampling data, plus new columns with the values for each metric. The wide format of this data frame allows it to be passed through a function to fit a statistical model (e.g. through a formula: response_variable ~ metric_1 + metric_2 + … + metric_n) (Huais 2018), which would have the landscape metrics of land covers as main predictor variables, and the NDVI values as relevant covariates.

An experimental design like the exposed here, which assesses several spatial scales, is useful for evaluating the pattern of change in the value of a landscape metric at different spatial scales (Wu 2004). The package provides this functionality through the function metrics_scalogram(), which plots the value of a landscape metric across increasing spatial scales (i.e. radii). Details about this function plus several examples can be explored in supplementary material and in the help page of the function.

Case study: disentangling the differential effects of landscape metrics

Ecologists have engaged some rich discussions regarding the effects of habitat loss and habitat fragmentation on biodiversity (e.g. Fahrig 2013, 2017; Hanski 2015; Fletcher et al. 2018; Fahrig et al. 2019; Saura 2021; Valente et al. 2023). Among various aspects to consider, some authors claim that the effect of habitat loss can be disentangled from the effect of habitat fragmentation (e.g. Fahrig 2017), whereas other have stated that these processes are coupled and cannot be analyzed separately (e.g. Hanski 2015). In any case, one can define habitat fragmentation as a landscape pattern (rather than a process) occurring at a landscape level (usually defined as habitat fragmentation per se) (Fahrig 2017) and define one or more landscape metrics to quantify this pattern (e.g. Melo et al. 2017; De Camargo et al. 2018; Nery et al. 2018). In this context, we could ask the following question: how does habitat loss affect biodiversity when controlling for habitat fragmentation? In addition, if biodiversity is measured within a focal forest patch, one could hypothesize that the size of the patch could influence the response variable (Hanski 2015), so this variable could be controlled by the experimental design.

As a first step, the proposed design would require selecting a gradient of landscapes with nearly fixed values for the area of the forest patches. The package multilandr provides the tools to perform such tasks. First, given a study area, we generate random point locations through the function generate_points(). This function outputs an object of class ‘SpatVector’ (from package terra; Hijmans 2023) with the generated points. As in the first case study, the study area comprises a raster layer with land covers from a clipped area of the South American Chaco ecoregion for the year 2000 (Project MapBiomas Chaco 2022).

figure e

By defining the argument approach as "patch", points will be generated inside patches that fulfill the conditions specified in the argument patch_conditions. In the latter, a list of conditions must be provided through the helper function conditions(), each condition in a distinct list. In this example, the first element of the required condition refers to the class of the patches (1, which for the given raster layer is the “forest” class). The second element "area" means that selected forest patches must have an area that ranges between a minimum of 8 hectares (third element) and 12 hectares (fourth element). The second element must be a patch-level metric, and may be any patch-level metric provided by package landscapemetrics (a list of them is accessible through metrics_list()). Besides generating points through the "patch" approach, the function offers a "random" and a "grid" option. Finally, by defining argument "padding" as 2500, we inform the function not to generate points within 2500 m from the margins of the raster.

Then, as in the first example, we generate a ‘MultiLand’ object through mland(). In this case, we set on_the_fly = TRUE to inform the function not to generate in this step the intersections between buffers around sites and the provided raster layers. The advantage of this is that memory will not be occupied with an unnecessary large object, and intersections will be generated when required by the package “on the fly”. For this example, we specify a unique radius of 2000 m.

figure f

As in the first case study, we then calculate different landscape metrics through mland_metrics(). For this example, we calculate the percentage of landscape occupied by forest and the number of forest patches. Absence values are set to zero for both metrics, as this should be the value in the case no land cover is present in the landscape (Table 1b).

figure g

The function metrics_corr() calculates the correlation between these metrics. Similarly the function metrics_plots() allows to visualize relationships between different metrics, between different classes of the same metrics and between different radii of the same metric and class (Fig. 4).

figure h
Fig. 4
figure 4

Output of the function metrics_plots(). Pair plots between the value of different metrics (percentage of landscape -pland- and number of patches -np- for the class “Forest”) and different radii (in this case, only one radius: 2000 m). The abbreviation “r1” for each plot title refers to the raster layer number one. Diagonal plots depict the distribution of data points of the values of the metrics labeled in the columns. For the purpose of the example, those landscapes selected after applying a filter to the number of patches (with metrics_filter()) are colored (in green or purple), and solely in purple those 30 landscapes selected to be part of the gradient (with metric_gradient()). See the main text for details


Based on the research question, we need to control for forest fragmentation. A common measure for this landscape pattern is the number of forest patches within a given landscape (e.g. De Camargo et al. 2018). This number should be relatively fixed, this is, the number of forest patches should be somehow similar across all landscapes. A rapid inspection of Fig. 4 shows a wide range of values for the number of patches within these landscapes, from 1 to almost 60 patches, which is clearly too large if we aim to control for habitat fragmentation. A precise selection of landscapes can be done through the function metrics_filter(), by inputting an object of class ‘MultiLandMetrics’ generated with mland_metrics().

figure i

Here, the argument conditions is generated through the helper function of the same name, and each condition must be defined as a list with the following elements in the expressed order: raster layer, class, radii, metric to be considered in this condition, and the minimum and maximum values for the specified metric. In this case, we specify that all selected landscapes of radius 2000 m for all raster layers (by setting the first element as NA, although in this example there is only one raster layer) must present between 10 and 15 forest patches. As expected, only a portion of the sites fulfill the required condition (totaling 136, ~ 22% of the original number of sites). In Fig. 4, we can see that for the selected points (colored, either in green or purple), the number of forest patches remain relatively fixed (between 10 and 15 patches), while the forest amount ("pland") presents a wide range of values, between ~ 1 to ~ 65%.

Finally, moving a bit away from the main research question of this case study, we could assume that a researcher need to select landscapes for field sampling. In this case, a logical next step would be to select a realistic number of these landscapes to sample. This set of landscapes would comprise a gradient for the percentage of forest. For the gradient to be robust, this should present a wide range of values for this landscape metric, covering a good range of intermediate values between minimum and maximum values. This task can be performed with the function metrics_gradient(), as follows:

figure j

Here, we are requesting a gradient of 30 points (argument n) for the metric "pland" and class "Forest" (from raster layer 1 and radius 2000 m). The algorithm will select 30 landscapes that present values for the specified landscape metric that are the closest to a set of numbers or cutpoints. By default, these cutpoints will be calculated as a range of values equally distributed between the minimum and maximum value for the specified metric. Alternatively, to provide more flexibility, the function allows the user to manually specify these cutpoints (see more details in ?metrics_gradient).

In Fig. 4, we can see in purple those selected landscapes that are part of the subset of landscapes previously filtered with metrics_filter(). Overall, after the series of applied filters, we have obtained a gradient of a practical number of landscapes where: (i) central points are located in patches of size between 8 and 12 ha (after calling generate_points()), (ii) the number of forest patches within each landscape ranges between 10 and 15 (after calling metrics_filter()), and (iii) the percentage of forest ranges between absolute minimum and maximum values, with a well-distributed range of intermediate values (after calling metrics_gradient()).

Discussion

The R package multilandr provides the framework to analyze, visualize and process spatial data, specially oriented to develop the first steps to conduct any landscape-scale study. As exemplified in the first case study, the compartmentalization of spatial data in specially programmed object’s classes provides the user with a full control of the whole process of analysis. There is a general awareness in the landscape ecology community that spatial scale can influence the results of a study, and examining multiple spatial scales is preferable to a single-scale approach (Wu 2007). Multi-scale approaches allow to evaluate how landscape attributes or given ecological responses vary across different spatial scales (Wu 2004; Jackson and Fahrig 2015). In addition, assessing several spatial scales is commonly a preliminary step to select a proper scale for a given species or group of species (Jackson and Fahrig 2012, 2015; Wheatley and Johnson 2009). The package provides the necessary tools for multi-scale experimental designs and facilitates the calculation of landscape metrics in this context. It’s worth noting that the values of many landscape metrics are scale-dependent (e.g. the number of patches or the total area of a land cover). The user should carefully consider this issue in multi-scale approaches, as it could result in landscapes of different sizes not being comparable for such metrics. Besides, a quick visual inspection can be performed through the plotting tool. Alternatively, preprocessed spatial data can be exported as GIS data for a more exhaustive examination through a GIS software.

As highlighted in the second case study, the package provides utility functions to perform an optimal selection of landscapes that would fulfill certain conditions regarding the values of their landscape metrics, according to the research interest of the user. This is the case of studies that, for instance, aim to statistically disentangle differential effects of landscape metrics on biodiversity (e.g. Melo et al. 2017; De Camargo et al. 2018; Verga et al. 2021). After the calculation of metrics, the user can perform a precise filtering of landscapes that meet certain conditions. An additional filtering can be made, through the selection of a small but widely ranged gradient of landscapes. This would be the case, for instance, of an experimental design that requires field sampling, but the gradient of potential sampled landscapes must be restricted to reach more realistic number. These are common tasks for experimental designs conducted at a landscape-scale, and multilandr provide the right tools to perform a systematic selection of suitable landscapes according to the design requirements.

The structure of the package, where the functions orbit around classes ‘MultiLand’ and ‘MultiLandMetrics’, facilitate the expansion of functionality of the already available functions, as well as the programming of new ones. For example, new functions related to the selection of a set of landscapes might be useful, such as one that would select landscapes that fulfill more than one attribute at the same time, probably through the application of statistical matching techniques. Besides, the package performs well with both small and large spatial datasets in a regular computer (see Table 3 for the time to run each process in both case studies). However, increasing the speed of some processes for large datasets (e.g. processing thousands of points or large raster layers) might be possible through parallelization. This functionality will be available in further updates of the package.

Table 3 Performance of the package functions for both case studies, measured by the total time consumed in a regular computer, per process and overall

In conclusion, the presented R package provides a set of useful tools for any landscape-scale study involving an initial delimitation of landscapes followed by the calculation of metrics. This could be the case of studies evaluating relevant landscape ecology questions, but the package is also useful for any study involving GIS-related tasks at a landscape scale. The package also provide functionality to perform a thorough inspection and selection of landscapes that fulfill certain conditions. For those inexperienced R users, these tasks can be overwhelming, or time-consuming for the more experienced ones, and package multilandr addresses this need with a clean framework.