diff --git a/R/add_forests.R b/R/add_forests.R index 26afbd3..4ada97e 100644 --- a/R/add_forests.R +++ b/R/add_forests.R @@ -31,14 +31,14 @@ #' \item{"Z50": Depth (in mm) corresponding to 50 percent of fine roots.} #' \item{"Z95": Depth (in mm) corresponding to 95 percent of fine roots.} #' } -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}) from which valid species names are drawn. -#' @param merge_trees A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link{forest_mergeTrees}}). -#' @param merge_shrubs A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link{forest_mergeShrubs}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}) from which valid species names are drawn. +#' @param merge_trees A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link[medfate]{forest_mergeTrees}}). +#' @param merge_shrubs A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link[medfate]{forest_mergeShrubs}}). #' @param progress A logical flag to include a progress bar while processing the data. #' #' @details The current implementation will replace existing forests of the indicated 'id' values. #' -#' @return A modified object of class \code{\link{sf}} with column 'forest'. +#' @return A modified object of class \code{\link[sf]{sf}} with column 'forest'. #' @seealso [impute_forests()], \code{\link[medfate]{forest_mapWoodyTables}}, \code{\link[medfate]{forest_mergeTrees}} #' #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF diff --git a/R/add_soilgrids.R b/R/add_soilgrids.R index 7ab1718..047dd40 100644 --- a/R/add_soilgrids.R +++ b/R/add_soilgrids.R @@ -4,7 +4,7 @@ #' Function \code{modify_soils} modifies soil definition according to soil depth and depth to bedrock information. #' Function \code{check_soils} verifies that soil data does not contain missing values for key variables and, if so, assigns default values. #' -#' @param x An object of class \code{\link{sf}} with a valid CRS definition. If it contains a column called 'land_cover_type', soils will be retrieved for "agriculture" and "wildland" +#' @param x An object of class \code{\link[sf]{sf}} with a valid CRS definition. If it contains a column called 'land_cover_type', soils will be retrieved for "agriculture" and "wildland" #' cover types only. Otherwise, soils are retrieved for all locations. For functions \code{modify_soils} or \code{check_soils}, \code{x} should already contain a column named "soil". #' @param soilgrids_path Path to SoilGrids rasters (see details). If missing, the SoilGrids REST API (https://rest.isric.org) will be queried. #' @param widths A numeric vector indicating the desired layer widths, in \emph{mm}. If \code{NULL} the default soil grids layer definition is returned. @@ -31,7 +31,7 @@ #' When \code{depth_to_bedrock_map} is provided, the function truncates the total depth of the soil definition to the depth to bedrock. #' If regional maps of soil depth are not available, users are recommended to resort on Shangguan et al (2017). #' -#' @return A modified object of class \code{\link{sf}} with column 'soil'. +#' @return A modified object of class \code{\link[sf]{sf}} with column 'soil'. #' #' @author \enc{Víctor}{Victor} Granda, EMF-CREAF #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, EMF-CREAF @@ -217,8 +217,8 @@ add_soilgrids <- function(x, soilgrids_path = NULL, return(soildf) } -#' @param soil_depth_map An object of class \code{\link{rast}} or \code{\link{vect}} with the soil depth (in \emph{mm}) values. -#' @param depth_to_bedrock_map An object of class \code{\link{rast}} or \code{\link{vect}} with depth to bedrock (in \emph{mm}) values. +#' @param soil_depth_map An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with the soil depth (in \emph{mm}) values. +#' @param depth_to_bedrock_map An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with depth to bedrock (in \emph{mm}) values. #' @param regolith_rfc Rock fragment content, in percent volume, between soil depth and 200cm depth (or lower depths, if modified via \code{widths}). #' @param full_rock_filling Logical flag to modify rock fragment content in all soil layers with according to distance to soil depth. #' diff --git a/R/add_topography.R b/R/add_topography.R index 96ec16f..edcfb0d 100644 --- a/R/add_topography.R +++ b/R/add_topography.R @@ -2,9 +2,9 @@ #' #' Initializes topography and land cover type for a set of target locations #' -#' @param x An object of class \code{\link{sf}} -#' @param dem A digital elevation model (class \code{\link{SpatRaster}}) with meters as units -#' @param land_cover_map An object of class \code{\link{SpatRaster}} of land cover type. If missing, all locations are considered 'wildland'. +#' @param x An object of class \code{\link[sf]{sf}} +#' @param dem A digital elevation model (class \code{\link[terra]{SpatRaster}}) with meters as units +#' @param land_cover_map An object of class \code{\link[terra]{SpatRaster}} of land cover type. If missing, all locations are considered 'wildland'. #' @param wildland,agriculture,rock,artificial,water Strings indicating the mapping from the legend of land_cover_map. #' @param progress A logical flag to print console output #' @@ -12,7 +12,7 @@ #' The user should manually define the mapping of land cover classes in \code{land_cover_map} to the land cover types #' used in medfateland. #' -#' @return Function \code{add_topography()} returns a modified object of class \code{\link{sf}} with columns: +#' @return Function \code{add_topography()} returns a modified object of class \code{\link[sf]{sf}} with columns: #' \itemize{ #' \item{\code{id}: Numeric location identifiers (if not existing).} #' \item{\code{elevation}: Elevation above sea level (in m).} @@ -20,7 +20,7 @@ #' \item{\code{aspect}: Aspect (in degrees).} #' \item{\code{land_cover_type}: Land cover type.} #' } -#' Function \code{add_land_cover()} returns a modified object of class \code{\link{sf}} with new column: +#' Function \code{add_land_cover()} returns a modified object of class \code{\link[sf]{sf}} with new column: #' \itemize{ #' \item{\code{id}: Numeric location identifiers (if not existing).} #' \item{\code{land_cover_type}: Land cover type.} diff --git a/R/create_management_scenario.R b/R/create_management_scenario.R index 4e5a94b..05b1eb4 100644 --- a/R/create_management_scenario.R +++ b/R/create_management_scenario.R @@ -11,7 +11,7 @@ #' years according to the growth observed and the desired extraction rates. #' @param default_management_arguments A list of arguments to be passed to the managementFunction. These arguments will be taken as defaults #' copied for all management units and can later be modified. If NULL, the result of calling function -#' \code{\link{defaultManagementArguments}} will be taken. +#' \code{\link[medfate]{defaultManagementArguments}} will be taken. #' #' @details #' Three kinds of management scenarios are allowed: @@ -48,7 +48,7 @@ #' #' Aitor \enc{Améztegui}{Ameztegui}, UdL #' -#' @seealso \code{\link{fordyn_scenario}}, \code{\link{defaultManagementFunction}}, \code{\link{defaultPrescriptionsBySpecies}}, \code{\link{create_fire_regime}} +#' @seealso \code{\link{fordyn_scenario}}, \code{\link[medfate]{defaultManagementFunction}}, \code{\link{defaultPrescriptionsBySpecies}}, \code{\link{create_fire_regime}} #' #' @examples #' diff --git a/R/dataset_documentation.R b/R/dataset_documentation.R index 51e9461..05fbe21 100644 --- a/R/dataset_documentation.R +++ b/R/dataset_documentation.R @@ -11,21 +11,21 @@ #' Mario Beltrán & Míriam Piqué. Forest Science and Technology Centre of Catalonia (CTFC) #' @keywords data #' -#' @seealso \code{\link{create_management_scenario}}, \code{\link{defaultManagementArguments}}, +#' @seealso \code{\link{create_management_scenario}}, \code{\link[medfate]{defaultManagementArguments}}, #' \code{\link{fordyn_scenario}} NULL #' Example of watershed #' -#' An example of an object of \code{\link{sf}} with data for a small catchment of 66 ha (0.66 km2) in Catalonia. +#' An example of an object of \code{\link[sf]{sf}} with data for a small catchment of 66 ha (0.66 km2) in Catalonia. #' Object \code{example_watershed_burnin} is the result of three years of burn-in period. #' #' @name example_watershed #' @aliases example_watershed example_watershed_burnin #' @docType data #' @format -#' The data format is that of an object \code{\link{sf}} +#' The data format is that of an object \code{\link[sf]{sf}} #' #' @source #' \itemize{ @@ -55,7 +55,7 @@ NULL #' #' @name example_ifn #' @docType data -#' @format The data format is that of an object \code{\link{sf}} +#' @format The data format is that of an object \code{\link[sf]{sf}} #' #' @source #' \itemize{ diff --git a/R/default_volume_function.R b/R/default_volume_function.R index 958d626..4a72ee8 100644 --- a/R/default_volume_function.R +++ b/R/default_volume_function.R @@ -2,7 +2,7 @@ #' #' Example function for estimating wood volume (in m3/ha) from a tree table or forest object. #' -#' @param x A data frame with columns 'DBH', 'Height' and 'N' or a \code{\link{forest}} object +#' @param x A data frame with columns 'DBH', 'Height' and 'N' or a \code{\link[medfate]{forest}} object #' @param SpParams A data frame with species parameters (not used in the default function but will be called) #' #' @details Users should define their own functions taking into account that: diff --git a/R/dispersal.R b/R/dispersal.R index 5d201aa..606d291 100644 --- a/R/dispersal.R +++ b/R/dispersal.R @@ -49,17 +49,18 @@ kernel_int <- function(r, alpha, c) { # } # plot(dist_vec, kernel_fun(dist_vec, alpha,c), type = "l", log = log) # } + #' Seed production, dispersal and seed bank dynamics #' #' Simulates seed bank mortality, seed production and dispersal among stands #' -#' @param sf An object of class \code{\link{sf}} using a UTM projection (to measure distances in m) and with the following columns: +#' @param sf An object of class \code{\link[sf]{sf}} using a UTM projection (to measure distances in m) and with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} -#' \item{\code{forest}: Objects of class \code{\link{forest}}.} +#' \item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} #' } -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). -#' @param local_control A list of control parameters (see \code{\link{defaultControl}}) +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). +#' @param local_control A list of control parameters (see \code{\link[medfate]{defaultControl}}) #' @param distance_step Distance step in meters. #' @param maximum_dispersal_distance Maximum dispersal distance in meters. #' @param min_percent A minimum percent of seed bank to retain entry in \code{seedBank} element of \code{forest}. diff --git a/R/extract_variables.R b/R/extract_variables.R index f73fd93..80cfe5d 100644 --- a/R/extract_variables.R +++ b/R/extract_variables.R @@ -313,11 +313,11 @@ #' #' Extract or estimate variables from landscape objects (class 'sf'). #' -#' @param x An object of class \code{\link{sf}} with the appropriate columns. +#' @param x An object of class \code{\link[sf]{sf}} with the appropriate columns. #' @param vars A string vector with the name of the variables to extract (see details). #' @param variable A string with the name of the variables to draw (see details). -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}), required for most forest stand variables. -#' @param r An object of class \code{\link{rast}}, defining the raster topology. +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}), required for most forest stand variables. +#' @param r An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology. #' @param ... Additional arguments (not used). #' #' @details The following string values are available for \code{vars}. @@ -369,12 +369,12 @@ #' \item{\code{"shrub_volume"}: Shrub volume (m3/m2).} #' } #' -#' @returns Function \code{extract_variables()} returns an object of class \code{\link{sf}} with the desired variables. +#' @returns Function \code{extract_variables()} returns an object of class \code{\link[sf]{sf}} with the desired variables. #' Function \code{plot_variables()} returns a ggplot object. #' #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF. #' -#' @seealso \code{\link{forest}}, \code{\link{soil}}, \code{\link{summary.forest}}, \code{\link{shinyplot_land}} +#' @seealso \code{\link[medfate]{forest}}, \code{\link[medfate]{soil}}, \code{\link[medfate]{summary.forest}}, \code{\link{shinyplot_land}} #' #' @examples #' # Load data and species parameters from medfate diff --git a/R/fire_regime_instance.R b/R/fire_regime_instance.R index 5d13293..dd5ece1 100644 --- a/R/fire_regime_instance.R +++ b/R/fire_regime_instance.R @@ -2,7 +2,7 @@ #' #' Applies a fire regime object over a set of landscape units to determine a fire realization #' -#' @param sf An object of class \code{\link{sf}} with the following columns: +#' @param sf An object of class \code{\link[sf]{sf}} with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand identifiers.} @@ -14,7 +14,7 @@ #' @details #' The function randomly determines the landscape units that will burn every year, depending on the specifications #' of the fire regime object. Users can define their own fire regime instances from other models (e.g. a fire landscape model) -#' and then use those directly in functions \code{\link{fordyn_spatial}} or \code{\link{fordyn_scenario}}- +#' and then use those directly in functions \code{\link{fordyn_spatial}} or \code{\link{fordyn_scenario}}. #' #' @return An integer matrix specifying the day of the year of burning of each landscape unit for every year in the fire regime definition. #' Values are interpreted as follows: diff --git a/R/fordyn_scenario.R b/R/fordyn_scenario.R index 319e411..7f2e971 100644 --- a/R/fordyn_scenario.R +++ b/R/fordyn_scenario.R @@ -23,16 +23,16 @@ #' #' Evaluates forest dynamics over a landscape including climate and management scenarios #' -#' @param sf An object of class \code{\link{sf}} with the following columns: +#' @param sf An object of class \code{\link[sf]{sf}} with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand identifiers.} #' \item{\code{elevation}: Elevation above sea level (in m).} #' \item{\code{slope}: Slope (in degrees).} #' \item{\code{aspect}: Aspect (in degrees).} -#' \item{\code{forest}: Objects of class \code{\link{forest}}.} -#' \item{\code{soil}: Objects of class \code{\link{soil}}.} -#' \item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +#' \item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +#' \item{\code{soil}: Objects of class \code{\link[medfate]{soil}}.} +#' \item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} #' \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} #' \item{\code{management_unit}: Management unit corresponding to each stand.} #' \item{\code{represented_area_ha}: Area represented by each stand in hectares.} @@ -42,9 +42,9 @@ #' } #' Alternatively, the user may supply the result of a previous call to \code{fordyn_scenario}, where #' to continue simulations. -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). #' @param meteo Meteorology data (see \code{\link{fordyn_spatial}}). -#' @param local_control A list of local model control parameters (see \code{\link{defaultControl}}). +#' @param local_control A list of local model control parameters (see \code{\link[medfate]{defaultControl}}). #' @param volume_function A function accepting a forest object or a tree data table, and a species parameter table, as input and #' returning the wood volume (m3/ha) corresponding to each tree cohort. The function may accept additional arguments. #' If NULL, the default volume function is used (not recommended!). @@ -56,7 +56,7 @@ #' @param fire_regime A list of parameters defining the fire regime (see \code{\link{create_fire_regime}}) or #' a matrix representing a fire regime instance (see \code{\link{fire_regime_instance}}). #' If NULL, wildfires are not simulated. Details are given in \code{\link{fordyn_spatial}}. -#' @param summary_function An appropriate function to calculate summaries from an object of class 'fordyn' (e.g., \code{\link{summary.fordyn}}). +#' @param summary_function An appropriate function to calculate summaries from an object of class 'fordyn' (e.g., \code{\link[medfate]{summary.fordyn}}). #' @param summary_arguments List with additional arguments for the summary function. #' @param parallelize Boolean flag to try parallelization (will use all clusters minus one). #' @param num_cores Integer with the number of cores to be used for parallel computation. @@ -76,8 +76,8 @@ #' the previous state of the forest stand for the next year steps. Finally, the function evaluates how much of the specified demand #' has been fulfilled and stores the results, including demand offsets to be applied the year after. #' -#' Management is implemented using the \code{\link{defaultManagementFunction}} in medfate, -#' meaning that management parameters need to follow the structure of \code{\link{defaultManagementArguments}} +#' Management is implemented using the \code{\link[medfate]{defaultManagementFunction}} in medfate, +#' meaning that management parameters need to follow the structure of \code{\link[medfate]{defaultManagementArguments}} #' #' Details about the inclusion of fire regimes in simulations are explained in \code{\link{fordyn_spatial}}. #' diff --git a/R/impute_forests.R b/R/impute_forests.R index 854d0e9..2f41afd 100644 --- a/R/impute_forests.R +++ b/R/impute_forests.R @@ -7,19 +7,19 @@ #' \item{\code{check_forests()} checks that forests are defined and do not contain missing values in key tree/shrub attributes.} #' } #' -#' @param x An object of class \code{\link{sf}}. If it contains a column named 'land_cover_type', imputation +#' @param x An object of class \code{\link[sf]{sf}}. If it contains a column named 'land_cover_type', imputation #' will be performed for locations whose land cover is "wildland". Otherwise, forest imputation is done for all locations. -#' For structural corrections or when checking, \code{x} should already contain a column named 'forest' containing \code{\link{forest}} objects. -#' @param sf_fi An object of class \code{\link{sf}} with forest inventory data column 'forest'. -#' @param dem A digital elevation model (class \code{\link{rast}}) with meters as units -#' @param forest_map An object of class \code{\link{rast}} or \code{\link{vect}} with the forest class map +#' For structural corrections or when checking, \code{x} should already contain a column named 'forest' containing \code{\link[medfate]{forest}} objects. +#' @param sf_fi An object of class \code{\link[sf]{sf}} with forest inventory data column 'forest'. +#' @param dem A digital elevation model (class \code{\link[terra]{SpatRaster}}) with meters as units +#' @param forest_map An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with the forest class map #' @param max_distance_km Maximum distance, in km, for forest inventory plot imputation. #' @param var_class Variable name or index containing forest classes in \code{forest_map}. If missing the first column is taken. -#' @param replace_existing A logical flag to force the replacement of existing \code{\link{forest}} objects, when present. +#' @param replace_existing A logical flag to force the replacement of existing \code{\link[medfate]{forest}} objects, when present. #' @param missing_class_imputation A logical flag to force imputation in locations where forest class is not defined. If \code{missing_class_imputation = TRUE}, imputation in those locations will be based on geographic and topographic criteria only. -#' @param missing_class_forest A \code{\link{forest}} object to be used for locations with missing class. -#' @param merge_trees A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link{forest_mergeTrees}}). -#' @param merge_shrubs A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link{forest_mergeShrubs}}). +#' @param missing_class_forest A \code{\link[medfate]{forest}} object to be used for locations with missing class. +#' @param merge_trees A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link[medfate]{forest_mergeTrees}}). +#' @param merge_shrubs A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link[medfate]{forest_mergeShrubs}}). #' @param progress A logical flag to print console output. #' #' @details @@ -34,7 +34,7 @@ #' #' Function \code{modify_forest_structure()} can be used to modify specific structure variables of the imputed forests #' building on rasters supplied by the user (typically from aerial or satellite LiDAR products). For any given metric, -#' the function will calculate the ratio of the structure metric between the target \code{\link{forest}} object (see \code{\link[medfate]{stand_basalArea}}) +#' the function will calculate the ratio of the structure metric between the target \code{\link[medfate]{forest}} object (see \code{\link[medfate]{stand_basalArea}}) #' and the input map in the target location. Options for structural variables are the following: #' \itemize{ #' \item{\code{mean_tree_height}: Should contain values in cm. Corrects tree heights and diameters (assuming a constant diameter-height relationship).} diff --git a/R/initialize_landscape.R b/R/initialize_landscape.R index 93f8ff5..edf7ed2 100644 --- a/R/initialize_landscape.R +++ b/R/initialize_landscape.R @@ -1,25 +1,25 @@ #' Initialization of model inputs for spatially-distributed forest stands #' -#' Initializes state for local models \code{\link{spwb}} or \code{\link{growth}}. +#' Initializes state for local models \code{\link[medfate]{spwb}} or \code{\link[medfate]{growth}}. #' -#' @param x An object of class \code{\link{sf}} with the following columns: +#' @param x An object of class \code{\link[sf]{sf}} with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} -#' \item{\code{forest}: Objects of class \code{\link{forest}}.} -#' \item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} +#' \item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +#' \item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} #' \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland' or 'agriculture').} #' \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} #' \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific cells (values can be \code{NULL} for the remaining ones).} #' } -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). -#' @param local_control A list of control parameters (see \code{\link{defaultControl}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). +#' @param local_control A list of control parameters (see \code{\link[medfate]{defaultControl}}). #' @param model A string to indicate the model, either \code{"spwb"} or \code{"growth"}. #' @param simplify Boolean flag to simplify forest to the tree and shrub cohorts with largest leaf area index. The leaf area index of the whole tree (respectively, shrub) layer will be attributed to the selected cohort. -#' See function \code{\link{forest_reduceToDominant}}. +#' See function \code{\link[medfate]{forest_reduceToDominant}}. #' @param replace Boolean flag to replace existing initialized states #' @param progress Boolean flag to display progress information. #' -#' @returns Replaces or adds column 'state' whose elements are \code{\link{spwbInput}} or \code{\link{growthInput}} objects +#' @returns Replaces or adds column 'state' whose elements are \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} objects #' and returns the modified object of class 'sf'. #' #' @details diff --git a/R/landscape_summary.R b/R/landscape_summary.R index 82c3480..566aed2 100644 --- a/R/landscape_summary.R +++ b/R/landscape_summary.R @@ -2,22 +2,22 @@ #' Forest and soil summaries over space #' #' Functions to calculates a summary function for the forest or soil of all spatial elements -#' in an object of class \code{\link{sf}} containing landscape information. +#' in an object of class \code{\link[sf]{sf}} containing landscape information. #' -#' @param object An object of class \code{\link{sf}}. +#' @param object An object of class \code{\link[sf]{sf}}. #' @param name A string of the element to summarize: "forest", "soil" or "state". -#' @param summary_function A function that accepts objects of class \code{\link{forest}}, \code{soil} or model input objects, respectively. +#' @param summary_function A function that accepts objects of class \code{\link[medfate]{forest}}, \code{\link[medfate]{soil}} or model input objects, respectively. #' @param ... Additional arguments to the summary function. #' @param unlist Logical flag to try converting the summaries into different columns #' @param progress Boolean flag to display progress information #' -#' @returns An object of class \code{\link{sf}} containing the calculated statistics. +#' @returns An object of class \code{\link[sf]{sf}} containing the calculated statistics. #' If \code{unlist = FALSE} column 'summary' is a list with summaries for each element. #' If \code{unlist = TRUE} different columns are returned instead, one per variable given in the summary function. #' #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF. #' -#' @seealso \code{\link{forest}}, \code{\link{soil}}, \code{\link{summary.forest}} +#' @seealso \code{\link[medfate]{forest}}, \code{\link[medfate]{soil}}, \code{\link[medfate]{summary.forest}} #' #' @examples #' # Load plot data and species parameters from medfate diff --git a/R/model_land.R b/R/model_land.R index f58a0b4..9257e92 100644 --- a/R/model_land.R +++ b/R/model_land.R @@ -1168,25 +1168,25 @@ #' #' Functions to perform simulations on a watershed described by a set of connected grid cells. #' \itemize{ -#' \item{Function \code{spwb_land} implements a distributed hydrological model that simulates daily local water balance, from \code{\link{spwb_day}}, +#' \item{Function \code{spwb_land} implements a distributed hydrological model that simulates daily local water balance, from \code{\link[medfate]{spwb_day}}, #' on grid cells of a watershed while accounting for overland runoff, subsurface flow and groundwater flow between cells.} #' \item{Function \code{growth_land} is similar to \code{spwb_land}, but includes daily local carbon balance, growth and mortality processes in grid cells, -#' provided by \code{\link{growth_day}}.} +#' provided by \code{\link[medfate]{growth_day}}.} #' \item{Function \code{fordyn_land} extends the previous two functions with the simulation of management, seed dispersal, recruitment #' and resprouting.} #' } #' -#' @param r An object of class \code{\link{SpatRaster}}, defining the raster topology. -#' @param sf An object of class \code{\link{sf}} with the following columns: +#' @param r An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology. +#' @param sf An object of class \code{\link[sf]{sf}} with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial point geometry corresponding to cell centers.} #' \item{\code{elevation}: Elevation above sea level (in m).} #' \item{\code{slope}: Slope (in degrees).} #' \item{\code{aspect}: Aspect (in degrees).} #' \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland', 'agriculture', 'rock', 'artificial' or 'water').} -#' \item{\code{forest}: Objects of class \code{\link{forest}}.} -#' \item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} -#' \item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +#' \item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +#' \item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} +#' \item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} #' \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} #' \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} #' \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific cells (values can be \code{NULL} for the remaining ones).} @@ -1205,17 +1205,17 @@ #' \item{\code{aquifer}: A numeric vector with the water content of the aquifer in each cell (in mm). If missing, it will be initialized to zero.} #' \item{\code{deep_aquifer_loss}: A numeric vector with the maximum daily loss to a deeper aquifer (in mm·day-1). If missing all cells take their value from \code{deep_aquifer_loss} in \code{\link{default_watershed_control}}} #' } -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). #' @param meteo Input meteorological data (see \code{\link{spwb_spatial}} and details). #' @param dates A \code{\link{Date}} object describing the days of the period to be modeled. #' @param CO2ByYear A named numeric vector with years as names and atmospheric CO2 concentration (in ppm) as values. Used to specify annual changes in CO2 concentration along the simulation (as an alternative to specifying daily values in \code{meteo}). #' @param summary_frequency Frequency in which cell summary will be produced (e.g. "years", "months", ...) (see \code{\link{cut.Date}}). #' In \code{fordyn_land} summaries are always produced at monthly resolution. -#' @param local_control A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}. By default, +#' @param local_control A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}. By default, #' parameter \code{soilDomains} is set to \code{"single"}, meaning a single-domain Richards model. #' @param watershed_control A list of watershed control parameters (see \code{\link{default_watershed_control}}). Importantly, the sub-model used #' for lateral water flows - either \enc{Francés}{Frances} et al. (2007) or \enc{Caviedes-Voullième}{Caviedes-Voullieme} et al. (2023) - is specified there. -#' @param management_function A function that implements forest management actions (see \code{\link{fordyn}}). +#' @param management_function A function that implements forest management actions (see \code{\link[medfate]{fordyn}}). #' of such lists, one per spatial unit. #' @param parallelize Boolean flag to try parallelization (see details). #' @param num_cores Integer with the number of cores to be used for parallel computation (by default it will use all clusters minus one). @@ -1225,7 +1225,7 @@ #' @return Functions \code{spwb_land}, \code{growth_land} and \code{fordyn_land} return a list of class of the same name as the function with the following elements: #' \itemize{ #' \item{\code{watershed_control}: A list with input control parameters.} -#' \item{\code{sf}: An object of class \code{\link{sf}}, similar to the output of \code{\link{spwb_spatial}}, +#' \item{\code{sf}: An object of class \code{\link[sf]{sf}}, similar to the output of \code{\link{spwb_spatial}}, #' with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} @@ -1269,9 +1269,9 @@ #' \item{\code{result}: A list of cell detailed results (only for those indicated in the input), with contents depending on the local model.} #' \item{\code{outlet}: A logical vector indicating outlet cells.} #' } -#' In function \code{fordyn_land} the \code{\link{sf}} object contains additional columns: +#' In function \code{fordyn_land} the \code{\link[sf]{sf}} object contains additional columns: #' \itemize{ -#' \item{\code{forest}: A list of \code{\link{forest}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} +#' \item{\code{forest}: A list of \code{\link[medfate]{forest}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} #' \item{\code{management_arguments}: A list of management arguments for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} #' \item{\code{tree_table}: A list of data frames for each simulated stand, containing the living trees at each time step.} #' \item{\code{shrub_table}: A list of data frames for each simulated stand, containing the living shrub at each time step.} @@ -1316,7 +1316,7 @@ #' #' Mario \enc{Morales-Hernández}{Morales-Hernandez}, Universidad de Zaragoza. #' -#' @seealso \code{\link{default_watershed_control}}, \code{\link{initialize_landscape}}, \code{\link{spwb_land_day}}, \code{\link{spwb_day}}, \code{\link{growth_day}}, +#' @seealso \code{\link{default_watershed_control}}, \code{\link{initialize_landscape}}, \code{\link{spwb_land_day}}, \code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, #' \code{\link{spwb_spatial}}, \code{\link{fordyn_spatial}}, \code{\link{dispersal}} #' #' @references @@ -1992,18 +1992,18 @@ cell_neighbors<-function(sf, r) { #' #' Functions to perform one-day simulations on a watershed described by a set of connected grid cells. #' \itemize{ -#' \item{Function \code{spwb_land_day} implements a distributed hydrological model that simulates daily local water balance, from \code{\link{spwb_day}}, +#' \item{Function \code{spwb_land_day} implements a distributed hydrological model that simulates daily local water balance, from \code{\link[medfate]{spwb_day}}, #' on grid cells of a watershed while accounting for overland runoff, subsurface flow and groundwater flow between cells.} #' \item{Function \code{growth_land_day} is similar to \code{spwb_land_day}, but includes daily local carbon balance, growth and mortality processes in grid cells, -#' provided by \code{\link{growth_day}}.} +#' provided by \code{\link[medfate]{growth_day}}.} #' } #' -#' @param r An object of class \code{\link{rast}}, defining the raster topology. -#' @param sf An object of class \code{\link{sf}} as described in \code{\link{spwb_land}}. -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). +#' @param r An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology. +#' @param sf An object of class \code{\link[sf]{sf}} as described in \code{\link{spwb_land}}. +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). #' @param meteo Input meteorological data (see \code{\link{spwb_spatial}} and details). #' @param date A string with the date to be simulated. -#' @param local_control A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}. +#' @param local_control A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}. #' @param watershed_control A list of watershed control parameters (see \code{\link{default_watershed_control}}). Importantly, the sub-model used #' for lateral water flows - either \enc{Francés}{Frances} et al. (2007) or \enc{Caviedes-Voullième}{Caviedes-Voullieme} et al. (2023) - is specified there. #' @param parallelize Boolean flag to try parallelization (see details). @@ -2057,7 +2057,7 @@ cell_neighbors<-function(sf, r) { #' #' Mario \enc{Morales-Hernández}{Morales-Hernandez}, Universidad de Zaragoza. #' -#' @seealso \code{\link{default_watershed_control}}, \code{\link{spwb_day}}, \code{\link{growth_day}}, +#' @seealso \code{\link{default_watershed_control}}, \code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, #' \code{\link{spwb_land}}, #' #' @references diff --git a/R/model_spatial.R b/R/model_spatial.R index ddd8193..24ecf8c 100644 --- a/R/model_spatial.R +++ b/R/model_spatial.R @@ -537,10 +537,10 @@ #' Simulations for spatially-distributed forest stands #' -#' Functions that allow calling local models \code{\link{spwb}}, \code{\link{growth}} or \code{\link{fordyn}}, for a set of forest stands distributed in specific locations. +#' Functions that allow calling local models \code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}} or \code{\link[medfate]{fordyn}}, for a set of forest stands distributed in specific locations. #' No spatial processes are simulated. #' -#' @param sf An object of class \code{\link{sf}} with the following columns: +#' @param sf An object of class \code{\link[sf]{sf}} with the following columns: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand identifiers.} @@ -548,9 +548,9 @@ #' \item{\code{slope}: Slope (in degrees).} #' \item{\code{aspect}: Aspect (in degrees).} #' \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland' or 'agriculture').} -#' \item{\code{forest}: Objects of class \code{\link{forest}}.} -#' \item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} -#' \item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +#' \item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +#' \item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} +#' \item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} #' \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} #' \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} #' \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific locations (values can be \code{NULL} for the remaining ones).} @@ -560,30 +560,30 @@ #' \item{\code{ignition_weights}: Relative weights to determine stands to be burned. Optional, relevant for \code{fordyn_spatial} when #' \code{fire_regime} is supplied only).} #' } -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). #' @param meteo Input meteorological data (see section details). If NULL, the function will expect a column 'meteo' in parameter \code{y}. -#' @param local_control A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}. +#' @param local_control A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}. #' @param dates A \code{\link{Date}} object describing the days of the period to be modeled. #' @param CO2ByYear A named numeric vector with years as names and atmospheric CO2 concentration (in ppm) as values. Used to specify annual changes in CO2 concentration along the simulation (as an alternative to specifying daily values in \code{meteo}). #' @param fire_regime A list of parameters defining the fire regime (see \code{\link{create_fire_regime}}) or #' a matrix representing a fire regime instance (see \code{\link{fire_regime_instance}}), #' to be used in simulations with \code{\link{fordyn_spatial}}. If NULL, wildfires are not simulated. #' @param keep_results Boolean flag to indicate that point/cell simulation results are to be returned (set to \code{FALSE} and use summary functions for large data sets). -#' @param summary_function An appropriate function to calculate summaries (e.g., \code{\link{summary.spwb}}). +#' @param summary_function An appropriate function to calculate summaries (e.g., \code{\link[medfate]{summary.spwb}}). #' @param summary_arguments List with additional arguments for the summary function. #' @param parallelize Boolean flag to try parallelization (will use all clusters minus one). #' @param num_cores Integer with the number of cores to be used for parallel computation. #' @param chunk_size Integer indicating the size of chuncks to be sent to different processes (by default, the number of spatial elements divided by the number of cores). #' @param progress Boolean flag to display progress information of simulations. #' @param local_verbose Boolean flag to display detailed progress information in local simulations. -#' @param management_function A function that implements forest management actions (see \code{\link{fordyn}}). +#' @param management_function A function that implements forest management actions (see \code{\link[medfate]{fordyn}}). #' of such lists, one per spatial unit. #' #' @details Simulation functions accept different formats for meteorological input (parameter \code{meteo}). #' The user may supply two kinds of daily weather sources: #' \enumerate{ #' \item{A data frame with meteorological data common for all spatial location (spatial variation of weather not considered).} -#' \item{An object or (a list of objects) of class \code{\link{stars}} with reference interpolation data created by package \code{\link{meteoland}}. +#' \item{An object or (a list of objects) of class \code{stars} with reference interpolation data created by package \code{\link[meteoland]{meteoland}}. #' If a list of such \emph{interpolator} objects is supplied, the simulation functions will interpolate on the target locations for the periods covered by each interpolator, #' but the user will be responsible for supplying interpolators in the correct temporal order.} #' } @@ -599,8 +599,8 @@ #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand id, taken from the input.} -#' \item{\code{state}: A list of \code{\link{spwbInput}} or \code{\link{growthInput}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} -#' \item{\code{forest}: A list of \code{\link{forest}} objects for each simulated stand (only in function \code{fordyn_spatial}), to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} +#' \item{\code{state}: A list of \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} +#' \item{\code{forest}: A list of \code{\link[medfate]{forest}} objects for each simulated stand (only in function \code{fordyn_spatial}), to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} #' \item{\code{management_arguments}: A list of management arguments for each simulated stand (only in function \code{fordyn_spatial} if management function was supplied), to be used in subsequent simulations (see \code{\link{update_landscape}}).} #' \item{\code{result}: A list of model output for each simulated stand. Some elements can contain an error condition if the simulation resulted in an error. Values will be NULL (or errors) if \code{keep_results = FALSE}.} #' \item{\code{summary}: A list of model output summaries for each simulated stand (if \code{summary_function} was not \code{NULL}), with NULL values whenever simulation errors occurred.} @@ -609,7 +609,7 @@ #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF #' #' @seealso -#' \code{\link{spwb}}, \code{\link{growth}}, \code{\link{fordyn}}, \code{\link{spwb_spatial_day}}, +#' \code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}}, \code{\link[medfate]{fordyn}}, \code{\link{spwb_spatial_day}}, #' \code{\link{simulation_summary}} , \code{\link{plot_summary}}, #' \code{\link{initialize_landscape}}, \code{\link{update_landscape}} #' diff --git a/R/model_spatial_day.R b/R/model_spatial_day.R index a32916c..513d478 100644 --- a/R/model_spatial_day.R +++ b/R/model_spatial_day.R @@ -211,21 +211,21 @@ #' One-day simulation for spatially-distributed forest stands #' -#' Functions that allow calling local models \code{\link{spwb_day}} or \code{\link{growth_day}}, +#' Functions that allow calling local models \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}, #' for a set of forest stands distributed in specific locations and a given date. #' No spatial processes are simulated. #' -#' @param sf An object of class \code{\link{sf}} with landscape information (see \code{\link{spwb_spatial}}). +#' @param sf An object of class \code{\link[sf]{sf}} with landscape information (see \code{\link{spwb_spatial}}). #' @param meteo Meteorology data (see \code{\link{spwb_spatial}}). #' @param date A string with the date to be simulated. -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}). -#' @param local_control A list of local model control parameters (see \code{\link{defaultControl}}). +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}). +#' @param local_control A list of local model control parameters (see \code{\link[medfate]{defaultControl}}). #' @param parallelize Boolean flag to try parallelization (will use all clusters minus one). #' @param num_cores Integer with the number of cores to be used for parallel computation. #' @param chunk_size Integer indicating the size of chunks to be sent to different processes (by default, the number of spatial elements divided by the number of cores). #' @param progress Boolean flag to display progress information for simulations. #' -#' @returns An object of class \code{\link{sf}} the same name as the function called containing three elements: +#' @returns An object of class \code{\link[sf]{sf}} the same name as the function called containing three elements: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand id, taken from the input.} @@ -237,7 +237,7 @@ #' #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF #' -#' @seealso \code{\link{spwb_day}}, \code{\link{growth_day}}, \code{\link{spwb_spatial}} +#' @seealso \code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, \code{\link{spwb_spatial}} #' #' @examples #' \donttest{ diff --git a/R/plot_summary.R b/R/plot_summary.R index 0b15621..c6592a5 100644 --- a/R/plot_summary.R +++ b/R/plot_summary.R @@ -55,10 +55,10 @@ #' #' Produces graphical output of the summaries of a simulation models #' -#' @param x An object of class \code{sf}, with simulation summaries. +#' @param x An object of class \code{\link[sf]{sf}}, with simulation summaries. #' @param variable The variable to be drawn. #' @param date The date of the summary to be plotted. -#' @param r An object of class \code{\link{rast}}, defining the raster topology. +#' @param r An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology. #' @param ... Additional parameters (passed to scale definition, such as \code{limits}). #' #' @details Appropriate values for \code{x} can originate from calls to \code{\link{simulation_summary}}. @@ -67,7 +67,7 @@ #' will already contain the summaries. A special case is made for \code{\link{spwb_land}} and \code{\link{growth_land}}, #' that are accepted inputs as \code{x}, because its element 'sf' is used. #' -#' @return An object of class \code{\link{ggplot}}. +#' @return An object of class \code{\link[ggplot2]{ggplot}}. #' @author Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF. #' #' @seealso \code{\link{spwb_spatial}}, \code{\link{simulation_summary}} diff --git a/R/shinyplot_land.R b/R/shinyplot_land.R index 7847398..f7e6497 100644 --- a/R/shinyplot_land.R +++ b/R/shinyplot_land.R @@ -80,16 +80,16 @@ #' Creates a shiny app with interactive plots for spatial inputs and simulation results #' #' @param x The object of class 'sf' containing information to be drawn (see details). Alternatively, an object of class 'spwb_land', 'growth_land' or 'fordyn_land'. -#' @param SpParams A data frame with species parameters (see \code{\link{SpParamsMED}}), required for most forest stand variables. -#' @param r An object of class \code{\link{rast}}, defining the raster topology. +#' @param SpParams A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}), required for most forest stand variables. +#' @param r An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology. #' #' @details Only run this function in interactive mode. The shiny app can be used to display spatial inputs or simulation results. #' #' \emph{Spatial inputs}: -#' This is the case if the user supplies an object of class \code{\link{sf}} with simulation inputs. +#' This is the case if the user supplies an object of class \code{\link[sf]{sf}} with simulation inputs. #' #' \emph{Simulation result summaries}: -#' This is the case if the user supplies an object of class \code{\link{sf}} with simulation summaries. Available plots depend on the summary function used to create the result summaries. +#' This is the case if the user supplies an object of class \code{\link[sf]{sf}} with simulation summaries. Available plots depend on the summary function used to create the result summaries. #' #' @return An object that represents the shiny app #' diff --git a/R/simulation_summary.R b/R/simulation_summary.R index 71294aa..b6cf7fe 100644 --- a/R/simulation_summary.R +++ b/R/simulation_summary.R @@ -6,11 +6,11 @@ #' @param summary_function The summary function to be executed on simulation results (see details). #' @param ... Additional parameters to the summary function. #' -#' @details The function supplied should take as input an object of local simulation function, i.e. \code{\link{spwb}}, \code{\link{growth}}, or \code{\link{fordyn}}. +#' @details The function supplied should take as input an object of local simulation function, i.e. \code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}}, or \code{\link[medfate]{fordyn}}. #' The output should be a matrix with dates as rows and variables in columns. -#' An example of suitable function is \code{\link{summary.spwb}}. +#' An example of suitable function is \code{\link[medfate]{summary.spwb}}. #' -#' @return An object of class \code{\link{sf}}, with the following two elements: +#' @return An object of class \code{\link[sf]{sf}}, with the following two elements: #' \itemize{ #' \item{\code{geometry}: Spatial geometry.} #' \item{\code{id}: Stand id, taken from the input.} diff --git a/R/update_landscape.R b/R/update_landscape.R index e42c056..7b6a76f 100644 --- a/R/update_landscape.R +++ b/R/update_landscape.R @@ -2,7 +2,7 @@ #' #' Updates the state of a spatial object 'x' according to the final state in simulation outcome 'y' #' -#' @param x An object of class \code{\link{sf}} with the corresponding landscape columns. +#' @param x An object of class \code{\link[sf]{sf}} with the corresponding landscape columns. #' @param y The object resulting of a simulation previously carried on \code{x} #' using \code{\link{spwb_spatial}}, \code{\link{growth_spatial}}, \code{\link{spwb_land}}, etc. #' diff --git a/man/add_forests.Rd b/man/add_forests.Rd index e9187b9..c68126d 100644 --- a/man/add_forests.Rd +++ b/man/add_forests.Rd @@ -50,16 +50,16 @@ add_forests( \item{"Z95": Depth (in mm) corresponding to 95 percent of fine roots.} }} -\item{merge_trees}{A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link{forest_mergeTrees}}).} +\item{merge_trees}{A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link[medfate]{forest_mergeTrees}}).} -\item{merge_shrubs}{A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link{forest_mergeShrubs}}).} +\item{merge_shrubs}{A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link[medfate]{forest_mergeShrubs}}).} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}) from which valid species names are drawn.} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}) from which valid species names are drawn.} \item{progress}{A logical flag to include a progress bar while processing the data.} } \value{ -A modified object of class \code{\link{sf}} with column 'forest'. +A modified object of class \code{\link[sf]{sf}} with column 'forest'. } \description{ Creates and adds forest data to an \code{\link{sf}} object by reading from tree and shrub data tables diff --git a/man/add_topography.Rd b/man/add_topography.Rd index 6687933..b2abe46 100644 --- a/man/add_topography.Rd +++ b/man/add_topography.Rd @@ -25,20 +25,20 @@ check_topography(x, filter_missing = FALSE) check_land_cover(x, filter_missing = FALSE) } \arguments{ -\item{x}{An object of class \code{\link{sf}}} +\item{x}{An object of class \code{\link[sf]{sf}}} -\item{dem}{A digital elevation model (class \code{\link{SpatRaster}}) with meters as units} +\item{dem}{A digital elevation model (class \code{\link[terra]{SpatRaster}}) with meters as units} \item{progress}{A logical flag to print console output} -\item{land_cover_map}{An object of class \code{\link{SpatRaster}} of land cover type. If missing, all locations are considered 'wildland'.} +\item{land_cover_map}{An object of class \code{\link[terra]{SpatRaster}} of land cover type. If missing, all locations are considered 'wildland'.} \item{wildland, agriculture, rock, artificial, water}{Strings indicating the mapping from the legend of land_cover_map.} \item{filter_missing}{Boolean flag to filter locations with missing data} } \value{ -Function \code{add_topography()} returns a modified object of class \code{\link{sf}} with columns: +Function \code{add_topography()} returns a modified object of class \code{\link[sf]{sf}} with columns: \itemize{ \item{\code{id}: Numeric location identifiers (if not existing).} \item{\code{elevation}: Elevation above sea level (in m).} @@ -46,7 +46,7 @@ Function \code{add_topography()} returns a modified object of class \code{\link{ \item{\code{aspect}: Aspect (in degrees).} \item{\code{land_cover_type}: Land cover type.} } -Function \code{add_land_cover()} returns a modified object of class \code{\link{sf}} with new column: +Function \code{add_land_cover()} returns a modified object of class \code{\link[sf]{sf}} with new column: \itemize{ \item{\code{id}: Numeric location identifiers (if not existing).} \item{\code{land_cover_type}: Land cover type.} diff --git a/man/create_management_scenario.Rd b/man/create_management_scenario.Rd index 2cc926b..9e6faa1 100644 --- a/man/create_management_scenario.Rd +++ b/man/create_management_scenario.Rd @@ -24,7 +24,7 @@ years according to the growth observed and the desired extraction rates.} \item{default_management_arguments}{A list of arguments to be passed to the managementFunction. These arguments will be taken as defaults copied for all management units and can later be modified. If NULL, the result of calling function -\code{\link{defaultManagementArguments}} will be taken.} +\code{\link[medfate]{defaultManagementArguments}} will be taken.} } \value{ A list with the following structure: @@ -81,7 +81,7 @@ scen_4 <- create_management_scenario(3, c("Quercus ilex/Quercus pubescens" = 10 "Pinus nigra" = 2000)) } \seealso{ -\code{\link{fordyn_scenario}}, \code{\link{defaultManagementFunction}}, \code{\link{defaultPrescriptionsBySpecies}}, \code{\link{create_fire_regime}} +\code{\link{fordyn_scenario}}, \code{\link[medfate]{defaultManagementFunction}}, \code{\link{defaultPrescriptionsBySpecies}}, \code{\link{create_fire_regime}} } \author{ Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF diff --git a/man/defaultPrescriptionsBySpecies.Rd b/man/defaultPrescriptionsBySpecies.Rd index e669f16..ca6816c 100644 --- a/man/defaultPrescriptionsBySpecies.Rd +++ b/man/defaultPrescriptionsBySpecies.Rd @@ -14,7 +14,7 @@ Default management prescriptions by species, defined according current practices A data frame with 27 species (or species groups) in rows and management parameters in columns (defined in \code{\link{defaultManagementArguments}}) } \seealso{ -\code{\link{create_management_scenario}}, \code{\link{defaultManagementArguments}}, +\code{\link{create_management_scenario}}, \code{\link[medfate]{defaultManagementArguments}}, \code{\link{fordyn_scenario}} } \keyword{data} diff --git a/man/default_volume_function.Rd b/man/default_volume_function.Rd index 940735b..d520b94 100644 --- a/man/default_volume_function.Rd +++ b/man/default_volume_function.Rd @@ -7,7 +7,7 @@ default_volume_function(x, SpParams = NULL) } \arguments{ -\item{x}{A data frame with columns 'DBH', 'Height' and 'N' or a \code{\link{forest}} object} +\item{x}{A data frame with columns 'DBH', 'Height' and 'N' or a \code{\link[medfate]{forest}} object} \item{SpParams}{A data frame with species parameters (not used in the default function but will be called)} } diff --git a/man/dispersal.Rd b/man/dispersal.Rd index 17cc791..84c4761 100644 --- a/man/dispersal.Rd +++ b/man/dispersal.Rd @@ -16,15 +16,15 @@ dispersal( ) } \arguments{ -\item{sf}{An object of class \code{\link{sf}} using a UTM projection (to measure distances in m) and with the following columns: +\item{sf}{An object of class \code{\link[sf]{sf}} using a UTM projection (to measure distances in m) and with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} -\item{\code{forest}: Objects of class \code{\link{forest}}.} +\item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} }} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} -\item{local_control}{A list of control parameters (see \code{\link{defaultControl}})} +\item{local_control}{A list of control parameters (see \code{\link[medfate]{defaultControl}})} \item{distance_step}{Distance step in meters.} diff --git a/man/example_ifn.Rd b/man/example_ifn.Rd index eb40247..ce7f8c4 100644 --- a/man/example_ifn.Rd +++ b/man/example_ifn.Rd @@ -5,7 +5,7 @@ \alias{example_ifn} \title{Example of distributed forest inventory stands} \format{ -The data format is that of an object \code{\link{sf}} +The data format is that of an object \code{\link[sf]{sf}} } \source{ \itemize{ diff --git a/man/example_watershed.Rd b/man/example_watershed.Rd index c2e3536..89fc7fb 100644 --- a/man/example_watershed.Rd +++ b/man/example_watershed.Rd @@ -6,7 +6,7 @@ \alias{example_watershed_burnin} \title{Example of watershed} \format{ -The data format is that of an object \code{\link{sf}} +The data format is that of an object \code{\link[sf]{sf}} } \source{ \itemize{ @@ -20,7 +20,7 @@ The data format is that of an object \code{\link{sf}} } } \description{ -An example of an object of \code{\link{sf}} with data for a small catchment of 66 ha (0.66 km2) in Catalonia. +An example of an object of \code{\link[sf]{sf}} with data for a small catchment of 66 ha (0.66 km2) in Catalonia. Object \code{example_watershed_burnin} is the result of three years of burn-in period. } \references{ diff --git a/man/extract_variables.Rd b/man/extract_variables.Rd index 8e36930..87f0fa1 100644 --- a/man/extract_variables.Rd +++ b/man/extract_variables.Rd @@ -10,20 +10,20 @@ extract_variables(x, vars = "land_cover_type", SpParams = NULL, ...) plot_variable(x, variable = "land_cover_type", SpParams = NULL, r = NULL, ...) } \arguments{ -\item{x}{An object of class \code{\link{sf}} with the appropriate columns.} +\item{x}{An object of class \code{\link[sf]{sf}} with the appropriate columns.} \item{vars}{A string vector with the name of the variables to extract (see details).} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}), required for most forest stand variables.} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}), required for most forest stand variables.} \item{...}{Additional arguments (not used).} \item{variable}{A string with the name of the variables to draw (see details).} -\item{r}{An object of class \code{\link{rast}}, defining the raster topology.} +\item{r}{An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology.} } \value{ -Function \code{extract_variables()} returns an object of class \code{\link{sf}} with the desired variables. +Function \code{extract_variables()} returns an object of class \code{\link[sf]{sf}} with the desired variables. Function \code{plot_variables()} returns a ggplot object. } \description{ @@ -91,7 +91,7 @@ extract_variables(example_ifn, vars = c("basal_area", "leaf_area_index"), } \seealso{ -\code{\link{forest}}, \code{\link{soil}}, \code{\link{summary.forest}}, \code{\link{shinyplot_land}} +\code{\link[medfate]{forest}}, \code{\link[medfate]{soil}}, \code{\link[medfate]{summary.forest}}, \code{\link{shinyplot_land}} } \author{ Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF. diff --git a/man/fire_regime_instance.Rd b/man/fire_regime_instance.Rd index 6278c70..37a88f6 100644 --- a/man/fire_regime_instance.Rd +++ b/man/fire_regime_instance.Rd @@ -7,7 +7,7 @@ fire_regime_instance(sf, fire_regime) } \arguments{ -\item{sf}{An object of class \code{\link{sf}} with the following columns: +\item{sf}{An object of class \code{\link[sf]{sf}} with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand identifiers.} @@ -32,7 +32,7 @@ Applies a fire regime object over a set of landscape units to determine a fire r \details{ The function randomly determines the landscape units that will burn every year, depending on the specifications of the fire regime object. Users can define their own fire regime instances from other models (e.g. a fire landscape model) -and then use those directly in functions \code{\link{fordyn_spatial}} or \code{\link{fordyn_scenario}}- +and then use those directly in functions \code{\link{fordyn_spatial}} or \code{\link{fordyn_scenario}}. } \examples{ # Load example data diff --git a/man/fordyn_scenario.Rd b/man/fordyn_scenario.Rd index fa75453..aff2355 100644 --- a/man/fordyn_scenario.Rd +++ b/man/fordyn_scenario.Rd @@ -26,16 +26,16 @@ fordyn_scenario( ) } \arguments{ -\item{sf}{An object of class \code{\link{sf}} with the following columns: +\item{sf}{An object of class \code{\link[sf]{sf}} with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand identifiers.} \item{\code{elevation}: Elevation above sea level (in m).} \item{\code{slope}: Slope (in degrees).} \item{\code{aspect}: Aspect (in degrees).} -\item{\code{forest}: Objects of class \code{\link{forest}}.} -\item{\code{soil}: Objects of class \code{\link{soil}}.} -\item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +\item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +\item{\code{soil}: Objects of class \code{\link[medfate]{soil}}.} +\item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} \item{\code{management_unit}: Management unit corresponding to each stand.} \item{\code{represented_area_ha}: Area represented by each stand in hectares.} @@ -46,7 +46,7 @@ fordyn_scenario( Alternatively, the user may supply the result of a previous call to \code{fordyn_scenario}, where to continue simulations.} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} \item{meteo}{Meteorology data (see \code{\link{fordyn_spatial}}).} @@ -58,7 +58,7 @@ If NULL, the default volume function is used (not recommended!).} \item{volume_arguments}{List with additional arguments for the volume function.} -\item{local_control}{A list of local model control parameters (see \code{\link{defaultControl}}).} +\item{local_control}{A list of local model control parameters (see \code{\link[medfate]{defaultControl}}).} \item{dispersal_control}{A list of dispersal control parameters (see \code{\link{default_dispersal_control}}). If NULL, then dispersal is not simulated.} @@ -70,7 +70,7 @@ If NULL, the default volume function is used (not recommended!).} a matrix representing a fire regime instance (see \code{\link{fire_regime_instance}}). If NULL, wildfires are not simulated. Details are given in \code{\link{fordyn_spatial}}.} -\item{summary_function}{An appropriate function to calculate summaries from an object of class 'fordyn' (e.g., \code{\link{summary.fordyn}}).} +\item{summary_function}{An appropriate function to calculate summaries from an object of class 'fordyn' (e.g., \code{\link[medfate]{summary.fordyn}}).} \item{summary_arguments}{List with additional arguments for the summary function.} @@ -124,8 +124,8 @@ If the simulation of some stands results in an error, the function will try to r the previous state of the forest stand for the next year steps. Finally, the function evaluates how much of the specified demand has been fulfilled and stores the results, including demand offsets to be applied the year after. -Management is implemented using the \code{\link{defaultManagementFunction}} in medfate, -meaning that management parameters need to follow the structure of \code{\link{defaultManagementArguments}} +Management is implemented using the \code{\link[medfate]{defaultManagementFunction}} in medfate, +meaning that management parameters need to follow the structure of \code{\link[medfate]{defaultManagementArguments}} Details about the inclusion of fire regimes in simulations are explained in \code{\link{fordyn_spatial}}. } diff --git a/man/forest_parametrization.Rd b/man/forest_parametrization.Rd index 13a50c0..3e3a24c 100644 --- a/man/forest_parametrization.Rd +++ b/man/forest_parametrization.Rd @@ -35,29 +35,29 @@ modify_forest_structure( check_forests(x, progress = FALSE) } \arguments{ -\item{x}{An object of class \code{\link{sf}}. If it contains a column named 'land_cover_type', imputation +\item{x}{An object of class \code{\link[sf]{sf}}. If it contains a column named 'land_cover_type', imputation will be performed for locations whose land cover is "wildland". Otherwise, forest imputation is done for all locations. -For structural corrections or when checking, \code{x} should already contain a column named 'forest' containing \code{\link{forest}} objects.} +For structural corrections or when checking, \code{x} should already contain a column named 'forest' containing \code{\link[medfate]{forest}} objects.} -\item{sf_fi}{An object of class \code{\link{sf}} with forest inventory data column 'forest'.} +\item{sf_fi}{An object of class \code{\link[sf]{sf}} with forest inventory data column 'forest'.} -\item{dem}{A digital elevation model (class \code{\link{rast}}) with meters as units} +\item{dem}{A digital elevation model (class \code{\link[terra]{SpatRaster}}) with meters as units} -\item{forest_map}{An object of class \code{\link{rast}} or \code{\link{vect}} with the forest class map} +\item{forest_map}{An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with the forest class map} \item{var_class}{Variable name or index containing forest classes in \code{forest_map}. If missing the first column is taken.} \item{max_distance_km}{Maximum distance, in km, for forest inventory plot imputation.} -\item{replace_existing}{A logical flag to force the replacement of existing \code{\link{forest}} objects, when present.} +\item{replace_existing}{A logical flag to force the replacement of existing \code{\link[medfate]{forest}} objects, when present.} \item{missing_class_imputation}{A logical flag to force imputation in locations where forest class is not defined. If \code{missing_class_imputation = TRUE}, imputation in those locations will be based on geographic and topographic criteria only.} -\item{missing_class_forest}{A \code{\link{forest}} object to be used for locations with missing class.} +\item{missing_class_forest}{A \code{\link[medfate]{forest}} object to be used for locations with missing class.} -\item{merge_trees}{A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link{forest_mergeTrees}}).} +\item{merge_trees}{A logical flag to simplify tree cohorts by merging tree records in DBH classes (see \code{\link[medfate]{forest_mergeTrees}}).} -\item{merge_shrubs}{A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link{forest_mergeShrubs}}).} +\item{merge_shrubs}{A logical flag to simplify shrub cohorts by merging shrub records in height classes (see \code{\link[medfate]{forest_mergeShrubs}}).} \item{progress}{A logical flag to print console output.} @@ -96,7 +96,7 @@ to reduce the number of records (and hence, speed-up simulations). Function \code{modify_forest_structure()} can be used to modify specific structure variables of the imputed forests building on rasters supplied by the user (typically from aerial or satellite LiDAR products). For any given metric, -the function will calculate the ratio of the structure metric between the target \code{\link{forest}} object (see \code{\link[medfate]{stand_basalArea}}) +the function will calculate the ratio of the structure metric between the target \code{\link[medfate]{forest}} object (see \code{\link[medfate]{stand_basalArea}}) and the input map in the target location. Options for structural variables are the following: \itemize{ \item{\code{mean_tree_height}: Should contain values in cm. Corrects tree heights and diameters (assuming a constant diameter-height relationship).} diff --git a/man/initialize_landscape.Rd b/man/initialize_landscape.Rd index c0b139f..4ae4f63 100644 --- a/man/initialize_landscape.Rd +++ b/man/initialize_landscape.Rd @@ -15,35 +15,35 @@ initialize_landscape( ) } \arguments{ -\item{x}{An object of class \code{\link{sf}} with the following columns: +\item{x}{An object of class \code{\link[sf]{sf}} with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} -\item{\code{forest}: Objects of class \code{\link{forest}}.} -\item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} +\item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +\item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland' or 'agriculture').} \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific cells (values can be \code{NULL} for the remaining ones).} }} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} -\item{local_control}{A list of control parameters (see \code{\link{defaultControl}}).} +\item{local_control}{A list of control parameters (see \code{\link[medfate]{defaultControl}}).} \item{model}{A string to indicate the model, either \code{"spwb"} or \code{"growth"}.} \item{simplify}{Boolean flag to simplify forest to the tree and shrub cohorts with largest leaf area index. The leaf area index of the whole tree (respectively, shrub) layer will be attributed to the selected cohort. -See function \code{\link{forest_reduceToDominant}}.} +See function \code{\link[medfate]{forest_reduceToDominant}}.} \item{replace}{Boolean flag to replace existing initialized states} \item{progress}{Boolean flag to display progress information.} } \value{ -Replaces or adds column 'state' whose elements are \code{\link{spwbInput}} or \code{\link{growthInput}} objects +Replaces or adds column 'state' whose elements are \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} objects and returns the modified object of class 'sf'. } \description{ -Initializes state for local models \code{\link{spwb}} or \code{\link{growth}}. +Initializes state for local models \code{\link[medfate]{spwb}} or \code{\link[medfate]{growth}}. } \details{ Initialization is dealt automatically when calling simulation functions \code{\link{spwb_spatial}}, \code{\link{growth_spatial}}, diff --git a/man/landscape_summary.Rd b/man/landscape_summary.Rd index e0b8db8..e6048d4 100644 --- a/man/landscape_summary.Rd +++ b/man/landscape_summary.Rd @@ -14,11 +14,11 @@ landscape_summary( ) } \arguments{ -\item{object}{An object of class \code{\link{sf}}.} +\item{object}{An object of class \code{\link[sf]{sf}}.} \item{name}{A string of the element to summarize: "forest", "soil" or "state".} -\item{summary_function}{A function that accepts objects of class \code{\link{forest}}, \code{soil} or model input objects, respectively.} +\item{summary_function}{A function that accepts objects of class \code{\link[medfate]{forest}}, \code{\link[medfate]{soil}} or model input objects, respectively.} \item{...}{Additional arguments to the summary function.} @@ -27,13 +27,13 @@ landscape_summary( \item{progress}{Boolean flag to display progress information} } \value{ -An object of class \code{\link{sf}} containing the calculated statistics. +An object of class \code{\link[sf]{sf}} containing the calculated statistics. If \code{unlist = FALSE} column 'summary' is a list with summaries for each element. If \code{unlist = TRUE} different columns are returned instead, one per variable given in the summary function. } \description{ Functions to calculates a summary function for the forest or soil of all spatial elements -in an object of class \code{\link{sf}} containing landscape information. +in an object of class \code{\link[sf]{sf}} containing landscape information. } \examples{ # Load plot data and species parameters from medfate @@ -47,7 +47,7 @@ landscape_summary(example_ifn, "forest", summary.forest, SpParamsMED) } \seealso{ -\code{\link{forest}}, \code{\link{soil}}, \code{\link{summary.forest}} +\code{\link[medfate]{forest}}, \code{\link[medfate]{soil}}, \code{\link[medfate]{summary.forest}} } \author{ Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF. diff --git a/man/plot_summary.Rd b/man/plot_summary.Rd index 4ce36bb..985aaed 100644 --- a/man/plot_summary.Rd +++ b/man/plot_summary.Rd @@ -7,18 +7,18 @@ plot_summary(x, variable, date, r = NULL, ...) } \arguments{ -\item{x}{An object of class \code{sf}, with simulation summaries.} +\item{x}{An object of class \code{\link[sf]{sf}}, with simulation summaries.} \item{variable}{The variable to be drawn.} \item{date}{The date of the summary to be plotted.} -\item{r}{An object of class \code{\link{rast}}, defining the raster topology.} +\item{r}{An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology.} \item{...}{Additional parameters (passed to scale definition, such as \code{limits}).} } \value{ -An object of class \code{\link{ggplot}}. +An object of class \code{\link[ggplot2]{ggplot}}. } \description{ Produces graphical output of the summaries of a simulation models diff --git a/man/shinyplot_land.Rd b/man/shinyplot_land.Rd index 01bacb5..1e54dec 100644 --- a/man/shinyplot_land.Rd +++ b/man/shinyplot_land.Rd @@ -9,9 +9,9 @@ shinyplot_land(x, SpParams = NULL, r = NULL) \arguments{ \item{x}{The object of class 'sf' containing information to be drawn (see details). Alternatively, an object of class 'spwb_land', 'growth_land' or 'fordyn_land'.} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}), required for most forest stand variables.} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}), required for most forest stand variables.} -\item{r}{An object of class \code{\link{rast}}, defining the raster topology.} +\item{r}{An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology.} } \value{ An object that represents the shiny app @@ -23,10 +23,10 @@ Creates a shiny app with interactive plots for spatial inputs and simulation res Only run this function in interactive mode. The shiny app can be used to display spatial inputs or simulation results. \emph{Spatial inputs}: -This is the case if the user supplies an object of class \code{\link{sf}} with simulation inputs. +This is the case if the user supplies an object of class \code{\link[sf]{sf}} with simulation inputs. \emph{Simulation result summaries}: -This is the case if the user supplies an object of class \code{\link{sf}} with simulation summaries. Available plots depend on the summary function used to create the result summaries. +This is the case if the user supplies an object of class \code{\link[sf]{sf}} with simulation summaries. Available plots depend on the summary function used to create the result summaries. } \seealso{ \code{\link{plot_summary}}, \code{\link{extract_variables}} diff --git a/man/simulation_summary.Rd b/man/simulation_summary.Rd index f32beb6..39ca85b 100644 --- a/man/simulation_summary.Rd +++ b/man/simulation_summary.Rd @@ -14,7 +14,7 @@ simulation_summary(object, summary_function, ...) \item{...}{Additional parameters to the summary function.} } \value{ -An object of class \code{\link{sf}}, with the following two elements: +An object of class \code{\link[sf]{sf}}, with the following two elements: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand id, taken from the input.} @@ -25,9 +25,9 @@ An object of class \code{\link{sf}}, with the following two elements: Creates spatial objects containing summaries of simulations } \details{ -The function supplied should take as input an object of local simulation function, i.e. \code{\link{spwb}}, \code{\link{growth}}, or \code{\link{fordyn}}. +The function supplied should take as input an object of local simulation function, i.e. \code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}}, or \code{\link[medfate]{fordyn}}. The output should be a matrix with dates as rows and variables in columns. -An example of suitable function is \code{\link{summary.spwb}}. +An example of suitable function is \code{\link[medfate]{summary.spwb}}. } \seealso{ \code{\link{spwb_spatial}}, \code{\link{plot_summary}} diff --git a/man/soil_parametrization.Rd b/man/soil_parametrization.Rd index eaec4f0..384c0bc 100644 --- a/man/soil_parametrization.Rd +++ b/man/soil_parametrization.Rd @@ -34,7 +34,7 @@ check_soils( ) } \arguments{ -\item{x}{An object of class \code{\link{sf}} with a valid CRS definition. If it contains a column called 'land_cover_type', soils will be retrieved for "agriculture" and "wildland" +\item{x}{An object of class \code{\link[sf]{sf}} with a valid CRS definition. If it contains a column called 'land_cover_type', soils will be retrieved for "agriculture" and "wildland" cover types only. Otherwise, soils are retrieved for all locations. For functions \code{modify_soils} or \code{check_soils}, \code{x} should already contain a column named "soil".} \item{soilgrids_path}{Path to SoilGrids rasters (see details). If missing, the SoilGrids REST API (https://rest.isric.org) will be queried.} @@ -45,9 +45,9 @@ cover types only. Otherwise, soils are retrieved for all locations. For function \item{progress}{A logical flag to include a progress bar while processing the output of the query to the SoilGrids REST API.} -\item{soil_depth_map}{An object of class \code{\link{rast}} or \code{\link{vect}} with the soil depth (in \emph{mm}) values.} +\item{soil_depth_map}{An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with the soil depth (in \emph{mm}) values.} -\item{depth_to_bedrock_map}{An object of class \code{\link{rast}} or \code{\link{vect}} with depth to bedrock (in \emph{mm}) values.} +\item{depth_to_bedrock_map}{An object of class \code{\link[terra]{SpatRaster}} or \code{\link[terra]{SpatVector}} with depth to bedrock (in \emph{mm}) values.} \item{regolith_rfc}{Rock fragment content, in percent volume, between soil depth and 200cm depth (or lower depths, if modified via \code{widths}).} @@ -60,7 +60,7 @@ cover types only. Otherwise, soils are retrieved for all locations. For function \item{default_values}{Vector of default values for locations with missing data.} } \value{ -A modified object of class \code{\link{sf}} with column 'soil'. +A modified object of class \code{\link[sf]{sf}} with column 'soil'. } \description{ Function \code{add_soilgrids} fills column 'soil' with physical soil characteristics drawn from SoilGrids 2.0 (Hengl et al. 2017; Poggio et al. 2021). diff --git a/man/spwb_land.Rd b/man/spwb_land.Rd index b5feb6f..2626e75 100644 --- a/man/spwb_land.Rd +++ b/man/spwb_land.Rd @@ -65,18 +65,18 @@ cell_neighbors(sf, r) \method{summary}{growth_land}(object, ...) } \arguments{ -\item{r}{An object of class \code{\link{SpatRaster}}, defining the raster topology.} +\item{r}{An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology.} -\item{sf}{An object of class \code{\link{sf}} with the following columns: +\item{sf}{An object of class \code{\link[sf]{sf}} with the following columns: \itemize{ \item{\code{geometry}: Spatial point geometry corresponding to cell centers.} \item{\code{elevation}: Elevation above sea level (in m).} \item{\code{slope}: Slope (in degrees).} \item{\code{aspect}: Aspect (in degrees).} \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland', 'agriculture', 'rock', 'artificial' or 'water').} -\item{\code{forest}: Objects of class \code{\link{forest}}.} -\item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} -\item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +\item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +\item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} +\item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific cells (values can be \code{NULL} for the remaining ones).} @@ -96,7 +96,7 @@ When using TETIS watershed model, the following columns are OPTIONAL: \item{\code{deep_aquifer_loss}: A numeric vector with the maximum daily loss to a deeper aquifer (in mm·day-1). If missing all cells take their value from \code{deep_aquifer_loss} in \code{\link{default_watershed_control}}} }} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} \item{meteo}{Input meteorological data (see \code{\link{spwb_spatial}} and details).} @@ -107,7 +107,7 @@ When using TETIS watershed model, the following columns are OPTIONAL: \item{summary_frequency}{Frequency in which cell summary will be produced (e.g. "years", "months", ...) (see \code{\link{cut.Date}}). In \code{fordyn_land} summaries are always produced at monthly resolution.} -\item{local_control}{A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}. By default, +\item{local_control}{A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}. By default, parameter \code{soilDomains} is set to \code{"single"}, meaning a single-domain Richards model.} \item{watershed_control}{A list of watershed control parameters (see \code{\link{default_watershed_control}}). Importantly, the sub-model used @@ -123,7 +123,7 @@ for lateral water flows - either \enc{Francés}{Frances} et al. (2007) or \enc{C \item{dispersal_control}{A list of dispersal control parameters (see \code{\link{default_dispersal_control}}). If NULL, then dispersal is not simulated.} -\item{management_function}{A function that implements forest management actions (see \code{\link{fordyn}}). +\item{management_function}{A function that implements forest management actions (see \code{\link[medfate]{fordyn}}). of such lists, one per spatial unit.} \item{object}{An object of class \code{spwb_land} or \code{groth_land}} @@ -134,7 +134,7 @@ of such lists, one per spatial unit.} Functions \code{spwb_land}, \code{growth_land} and \code{fordyn_land} return a list of class of the same name as the function with the following elements: \itemize{ \item{\code{watershed_control}: A list with input control parameters.} -\item{\code{sf}: An object of class \code{\link{sf}}, similar to the output of \code{\link{spwb_spatial}}, +\item{\code{sf}: An object of class \code{\link[sf]{sf}}, similar to the output of \code{\link{spwb_spatial}}, with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} @@ -178,9 +178,9 @@ with the following columns: \item{\code{result}: A list of cell detailed results (only for those indicated in the input), with contents depending on the local model.} \item{\code{outlet}: A logical vector indicating outlet cells.} } -In function \code{fordyn_land} the \code{\link{sf}} object contains additional columns: +In function \code{fordyn_land} the \code{\link[sf]{sf}} object contains additional columns: \itemize{ -\item{\code{forest}: A list of \code{\link{forest}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} +\item{\code{forest}: A list of \code{\link[medfate]{forest}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} \item{\code{management_arguments}: A list of management arguments for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}).} \item{\code{tree_table}: A list of data frames for each simulated stand, containing the living trees at each time step.} \item{\code{shrub_table}: A list of data frames for each simulated stand, containing the living shrub at each time step.} @@ -199,10 +199,10 @@ overall watershed export corresponds to the sum of row values.} \description{ Functions to perform simulations on a watershed described by a set of connected grid cells. \itemize{ -\item{Function \code{spwb_land} implements a distributed hydrological model that simulates daily local water balance, from \code{\link{spwb_day}}, +\item{Function \code{spwb_land} implements a distributed hydrological model that simulates daily local water balance, from \code{\link[medfate]{spwb_day}}, on grid cells of a watershed while accounting for overland runoff, subsurface flow and groundwater flow between cells.} \item{Function \code{growth_land} is similar to \code{spwb_land}, but includes daily local carbon balance, growth and mortality processes in grid cells, -provided by \code{\link{growth_day}}.} +provided by \code{\link[medfate]{growth_day}}.} \item{Function \code{fordyn_land} extends the previous two functions with the simulation of management, seed dispersal, recruitment and resprouting.} } @@ -288,7 +288,7 @@ res_simplified <- spwb_land(r, example_simplified, SpParamsMED, examplemeteo, \enc{Caviedes-Voullième}{Caviedes-Voullieme}, D., \enc{Morales-Hernández}{Morales-Hernandez}, M., Norman, M.R. & Ogzen-Xian, I. (2023). SERGHEI (SERGHEI-SWE) v1.0: a performance-portable high-performance parallel-computing shallow-water solver for hydrology and environmental hydraulics. Geoscientific Model Development, 16, 977-1008. } \seealso{ -\code{\link{default_watershed_control}}, \code{\link{initialize_landscape}}, \code{\link{spwb_land_day}}, \code{\link{spwb_day}}, \code{\link{growth_day}}, +\code{\link{default_watershed_control}}, \code{\link{initialize_landscape}}, \code{\link{spwb_land_day}}, \code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, \code{\link{spwb_spatial}}, \code{\link{fordyn_spatial}}, \code{\link{dispersal}} } \author{ diff --git a/man/spwb_land_day.Rd b/man/spwb_land_day.Rd index 449d4b5..98d5f45 100644 --- a/man/spwb_land_day.Rd +++ b/man/spwb_land_day.Rd @@ -34,17 +34,17 @@ growth_land_day( ) } \arguments{ -\item{r}{An object of class \code{\link{rast}}, defining the raster topology.} +\item{r}{An object of class \code{\link[terra]{SpatRaster}}, defining the raster topology.} -\item{sf}{An object of class \code{\link{sf}} as described in \code{\link{spwb_land}}.} +\item{sf}{An object of class \code{\link[sf]{sf}} as described in \code{\link{spwb_land}}.} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} \item{meteo}{Input meteorological data (see \code{\link{spwb_spatial}} and details).} \item{date}{A string with the date to be simulated.} -\item{local_control}{A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}.} +\item{local_control}{A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}.} \item{watershed_control}{A list of watershed control parameters (see \code{\link{default_watershed_control}}). Importantly, the sub-model used for lateral water flows - either \enc{Francés}{Frances} et al. (2007) or \enc{Caviedes-Voullième}{Caviedes-Voullieme} et al. (2023) - is specified there.} @@ -95,10 +95,10 @@ Functions \code{spwb_land_day} and \code{spwb_land_day} return a sf object: \description{ Functions to perform one-day simulations on a watershed described by a set of connected grid cells. \itemize{ -\item{Function \code{spwb_land_day} implements a distributed hydrological model that simulates daily local water balance, from \code{\link{spwb_day}}, +\item{Function \code{spwb_land_day} implements a distributed hydrological model that simulates daily local water balance, from \code{\link[medfate]{spwb_day}}, on grid cells of a watershed while accounting for overland runoff, subsurface flow and groundwater flow between cells.} \item{Function \code{growth_land_day} is similar to \code{spwb_land_day}, but includes daily local carbon balance, growth and mortality processes in grid cells, -provided by \code{\link{growth_day}}.} +provided by \code{\link[medfate]{growth_day}}.} } } \details{ @@ -144,7 +144,7 @@ sf_out <- spwb_land_day(r, example_watershed_burnin, SpParamsMED, examplemeteo, \enc{Caviedes-Voullième}{Caviedes-Voullieme}, D., \enc{Morales-Hernández}{Morales-Hernandez}, M., Norman, M.R. & Ogzen-Xian, I. (2023). SERGHEI (SERGHEI-SWE) v1.0: a performance-portable high-performance parallel-computing shallow-water solver for hydrology and environmental hydraulics. Geoscientific Model Development, 16, 977-1008. } \seealso{ -\code{\link{default_watershed_control}}, \code{\link{spwb_day}}, \code{\link{growth_day}}, +\code{\link{default_watershed_control}}, \code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, \code{\link{spwb_land}}, } \author{ diff --git a/man/spwb_spatial.Rd b/man/spwb_spatial.Rd index 789d166..1ae16e7 100644 --- a/man/spwb_spatial.Rd +++ b/man/spwb_spatial.Rd @@ -61,7 +61,7 @@ fordyn_spatial( ) } \arguments{ -\item{sf}{An object of class \code{\link{sf}} with the following columns: +\item{sf}{An object of class \code{\link[sf]{sf}} with the following columns: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand identifiers.} @@ -69,9 +69,9 @@ fordyn_spatial( \item{\code{slope}: Slope (in degrees).} \item{\code{aspect}: Aspect (in degrees).} \item{\code{land_cover_type}: Land cover type of each grid cell (values should be 'wildland' or 'agriculture').} -\item{\code{forest}: Objects of class \code{\link{forest}}.} -\item{\code{soil}: Objects of class \code{\link{soil}} or data frames of physical properties.} -\item{\code{state}: Objects of class \code{\link{spwbInput}} or \code{\link{growthInput}} (optional).} +\item{\code{forest}: Objects of class \code{\link[medfate]{forest}}.} +\item{\code{soil}: Objects of class \code{\link[medfate]{soil}} or data frames of physical properties.} +\item{\code{state}: Objects of class \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} (optional).} \item{\code{meteo}: Data frames with weather data (required if parameter \code{meteo = NULL}).} \item{\code{crop_factor}: Crop evapo-transpiration factor. Only required for 'agriculture' land cover type.} \item{\code{local_control}: A list of control parameters (optional). Used to override function parameter \code{local_control} for specific locations (values can be \code{NULL} for the remaining ones).} @@ -82,11 +82,11 @@ fordyn_spatial( \code{fire_regime} is supplied only).} }} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} \item{meteo}{Input meteorological data (see section details). If NULL, the function will expect a column 'meteo' in parameter \code{y}.} -\item{local_control}{A list of control parameters (see \code{\link{defaultControl}}) for function \code{\link{spwb_day}} or \code{\link{growth_day}}.} +\item{local_control}{A list of control parameters (see \code{\link[medfate]{defaultControl}}) for function \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}.} \item{dates}{A \code{\link{Date}} object describing the days of the period to be modeled.} @@ -94,7 +94,7 @@ fordyn_spatial( \item{keep_results}{Boolean flag to indicate that point/cell simulation results are to be returned (set to \code{FALSE} and use summary functions for large data sets).} -\item{summary_function}{An appropriate function to calculate summaries (e.g., \code{\link{summary.spwb}}).} +\item{summary_function}{An appropriate function to calculate summaries (e.g., \code{\link[medfate]{summary.spwb}}).} \item{summary_arguments}{List with additional arguments for the summary function.} @@ -112,7 +112,7 @@ fordyn_spatial( a matrix representing a fire regime instance (see \code{\link{fire_regime_instance}}), to be used in simulations with \code{\link{fordyn_spatial}}. If NULL, wildfires are not simulated.} -\item{management_function}{A function that implements forest management actions (see \code{\link{fordyn}}). +\item{management_function}{A function that implements forest management actions (see \code{\link[medfate]{fordyn}}). of such lists, one per spatial unit.} } \value{ @@ -120,15 +120,15 @@ An object of class 'sf' containing four elements: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand id, taken from the input.} -\item{\code{state}: A list of \code{\link{spwbInput}} or \code{\link{growthInput}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} -\item{\code{forest}: A list of \code{\link{forest}} objects for each simulated stand (only in function \code{fordyn_spatial}), to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} +\item{\code{state}: A list of \code{\link[medfate]{spwbInput}} or \code{\link[medfate]{growthInput}} objects for each simulated stand, to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} +\item{\code{forest}: A list of \code{\link[medfate]{forest}} objects for each simulated stand (only in function \code{fordyn_spatial}), to be used in subsequent simulations (see \code{\link{update_landscape}}) or with NULL values whenever simulation errors occurred.} \item{\code{management_arguments}: A list of management arguments for each simulated stand (only in function \code{fordyn_spatial} if management function was supplied), to be used in subsequent simulations (see \code{\link{update_landscape}}).} \item{\code{result}: A list of model output for each simulated stand. Some elements can contain an error condition if the simulation resulted in an error. Values will be NULL (or errors) if \code{keep_results = FALSE}.} \item{\code{summary}: A list of model output summaries for each simulated stand (if \code{summary_function} was not \code{NULL}), with NULL values whenever simulation errors occurred.} } } \description{ -Functions that allow calling local models \code{\link{spwb}}, \code{\link{growth}} or \code{\link{fordyn}}, for a set of forest stands distributed in specific locations. +Functions that allow calling local models \code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}} or \code{\link[medfate]{fordyn}}, for a set of forest stands distributed in specific locations. No spatial processes are simulated. } \details{ @@ -136,7 +136,7 @@ Simulation functions accept different formats for meteorological input (paramet The user may supply two kinds of daily weather sources: \enumerate{ \item{A data frame with meteorological data common for all spatial location (spatial variation of weather not considered).} -\item{An object or (a list of objects) of class \code{\link{stars}} with reference interpolation data created by package \code{\link{meteoland}}. +\item{An object or (a list of objects) of class \code{stars} with reference interpolation data created by package \code{\link[meteoland]{meteoland}}. If a list of such \emph{interpolator} objects is supplied, the simulation functions will interpolate on the target locations for the periods covered by each interpolator, but the user will be responsible for supplying interpolators in the correct temporal order.} } @@ -173,7 +173,7 @@ res_noman <- fordyn_spatial(example_subset, SpParamsMED, examplemeteo) } \seealso{ -\code{\link{spwb}}, \code{\link{growth}}, \code{\link{fordyn}}, \code{\link{spwb_spatial_day}}, +\code{\link[medfate]{spwb}}, \code{\link[medfate]{growth}}, \code{\link[medfate]{fordyn}}, \code{\link{spwb_spatial_day}}, \code{\link{simulation_summary}} , \code{\link{plot_summary}}, \code{\link{initialize_landscape}}, \code{\link{update_landscape}} } diff --git a/man/spwb_spatial_day.Rd b/man/spwb_spatial_day.Rd index 3c05c2f..f369e13 100644 --- a/man/spwb_spatial_day.Rd +++ b/man/spwb_spatial_day.Rd @@ -30,15 +30,15 @@ growth_spatial_day( ) } \arguments{ -\item{sf}{An object of class \code{\link{sf}} with landscape information (see \code{\link{spwb_spatial}}).} +\item{sf}{An object of class \code{\link[sf]{sf}} with landscape information (see \code{\link{spwb_spatial}}).} \item{meteo}{Meteorology data (see \code{\link{spwb_spatial}}).} \item{date}{A string with the date to be simulated.} -\item{SpParams}{A data frame with species parameters (see \code{\link{SpParamsMED}}).} +\item{SpParams}{A data frame with species parameters (see \code{\link[medfate]{SpParamsMED}}).} -\item{local_control}{A list of local model control parameters (see \code{\link{defaultControl}}).} +\item{local_control}{A list of local model control parameters (see \code{\link[medfate]{defaultControl}}).} \item{parallelize}{Boolean flag to try parallelization (will use all clusters minus one).} @@ -49,7 +49,7 @@ growth_spatial_day( \item{progress}{Boolean flag to display progress information for simulations.} } \value{ -An object of class \code{\link{sf}} the same name as the function called containing three elements: +An object of class \code{\link[sf]{sf}} the same name as the function called containing three elements: \itemize{ \item{\code{geometry}: Spatial geometry.} \item{\code{id}: Stand id, taken from the input.} @@ -58,7 +58,7 @@ An object of class \code{\link{sf}} the same name as the function called contain } } \description{ -Functions that allow calling local models \code{\link{spwb_day}} or \code{\link{growth_day}}, +Functions that allow calling local models \code{\link[medfate]{spwb_day}} or \code{\link[medfate]{growth_day}}, for a set of forest stands distributed in specific locations and a given date. No spatial processes are simulated. } @@ -82,7 +82,7 @@ res <- spwb_spatial_day(example_ifn, examplemeteo, date, SpParamsMED) } } \seealso{ -\code{\link{spwb_day}}, \code{\link{growth_day}}, \code{\link{spwb_spatial}} +\code{\link[medfate]{spwb_day}}, \code{\link[medfate]{growth_day}}, \code{\link{spwb_spatial}} } \author{ Miquel De \enc{Cáceres}{Caceres} Ainsa, CREAF diff --git a/man/update_landscape.Rd b/man/update_landscape.Rd index b4077dc..8e14237 100644 --- a/man/update_landscape.Rd +++ b/man/update_landscape.Rd @@ -7,7 +7,7 @@ update_landscape(x, y) } \arguments{ -\item{x}{An object of class \code{\link{sf}} with the corresponding landscape columns.} +\item{x}{An object of class \code{\link[sf]{sf}} with the corresponding landscape columns.} \item{y}{The object resulting of a simulation previously carried on \code{x} using \code{\link{spwb_spatial}}, \code{\link{growth_spatial}}, \code{\link{spwb_land}}, etc.}