Error(s) in re-building vignettes:
  ...
--- re-building ‘LinkWeightsAnalysis.Rmd’ using rmarkdown
trying URL 'https://s3.us-east-2.amazonaws.com/earthstatdata/HarvestedAreaYield175Crops_Indvidual_Geotiff/potato_HarvAreaYield_Geotiff.zip'
Content type 'application/zip' length 10812124 bytes (10.3 MB)
==================================================
downloaded 10.3 MB

--- finished re-building ‘LinkWeightsAnalysis.Rmd’

--- re-building ‘analysis.Rmd’ using rmarkdown
geohabnet-package          package:geohabnet           R Documentation

_g_e_o_h_a_b_n_e_t: _G_e_o_g_r_a_p_h_i_c_a_l _R_i_s_k _A_n_a_l_y_s_i_s _B_a_s_e_d _o_n _H_a_b_i_t_a_t _C_o_n_n_e_c_t_i_v_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     The geohabnet package is designed to perform a geographically or
     spatially explicit risk analysis of habitat connectivity. Xing et
     al (2021) doi:10.1093/biosci/biaa067
     <https://doi.org/10.1093/biosci/biaa067> proposed the concept of
     cropland connectivity as a risk factor for plant pathogen or pest
     invasions. As the functions in geohabnet were initially developed
     thinking on cropland connectivity, users are recommended to first
     be familiar with the concept by looking at the Xing et al paper.
     In a nutshell, a habitat connectivity analysis combines
     information from maps of host density, estimates the relative
     likelihood of pathogen movement between habitat locations in the
     area of interest, and applies network analysis to calculate the
     connectivity of habitat locations. The functions of geohabnet are
     built to conduct a habitat connectivity analysis relying on
     geographic parameters (spatial resolution and spatial extent),
     dispersal parameters (in two commonly used dispersal kernels:
     inverse power law and negative exponential models), and network
     parameters (link weight thresholds and network metrics). The
     functionality and main extensions provided by the functions in
     geohabnet to habitat connectivity analysis are a) Capability to
     easily calculate the connectivity of locations in a landscape
     using a single function, such as sensitivity_analysis() or
     msean(). b) As backbone datasets, the geohabnet package supports
     the use of two publicly available global datasets to calculate
     cropland density. The backbone datasets in the geohabnet package
     include crop distribution maps from Monfreda, C., N. Ramankutty,
     and J. A. Foley (2008) doi:10.1029/2007gb002947
     <https://doi.org/10.1029/2007gb002947> "Farming the planet: 2.
     Geographic distribution of crop areas, yields, physiological
     types, and net primary production in the year 2000, Global
     Biogeochem. Cycles, 22, GB1022" and International Food Policy
     Research Institute (2019) doi:10.7910/DVN/PRFF8V
     <https://doi.org/10.7910/DVN/PRFF8V> "Global
     Spatially-Disaggregated Crop Production Statistics Data for 2010
     Version 2.0, Harvard Dataverse, V4". Users can also provide any
     other geographic dataset that represents host density. c) Because
     the geohabnet package allows R users to provide maps of host
     density (as originally in Xing et al (2021)), host landscape
     density (representing the geographic distribution of either crops
     or wild species), or habitat distribution (such as host landscape
     density adjusted by climate suitability) as inputs, we propose the
     term habitat connectivity. d) The geohabnet package allows R users
     to customize parameter values in the habitat connectivity
     analysis, facilitating context-specific (pathogen- or
     pest-specific) analyses. e) The geohabnet package allows users to
     automatically visualize maps of the habitat connectivity of
     locations resulting from a sensitivity analysis across all
     customized parameter combinations. The primary function is sean()
     and sensitivity analysis(). Most functions in geohabnet provide as
     three main outcomes: i) A map of mean habitat connectivity across
     parameters selected by the user, ii) a map of variance of habitat
     connectivity across the selected parameters, and iii) a map of the
     difference between the ranks of habitat connectivity and habitat
     density. Each function can be used to generate these maps as
     'final' outcomes. Each function can also provide intermediate
     outcomes, such as the adjacency matrices built to perform the
     analysis, which can be used in other network analysis. Refer to
     article at
     <https://garrettlab.github.io/HabitatConnectivity/articles/analysis.html>
     to see examples of each function and how to access each of these
     outcome types. To change parameter values, the file called
     parameters.yaml stores the parameters and their values, can be
     accessed using get_parameters() and set new parameter values with
     set_parameters(). Users can modify up to ten parameters.

_A_u_t_h_o_r(_s):

     *Maintainer*: Krishna Keshav <mailto:kkeshav@ufl.edu>

     Authors:

        • Aaron Plex <mailto:plexaaron@ufl.edu> (ORCID)

        • Karen Garrett <mailto:karengarrett@ufl.edu> (ORCID)

     Other contributors:

        • Garrett Lab <mailto:karengarrett@ufl.edu>
          (https://garrettlab.com) [contributor]

        • University of Florida (https://www.ufl.edu) [copyright
          holder, funder]

_S_e_e _A_l_s_o:

     Useful links:

        • <https://garrettlab.github.io/HabitatConnectivity/>

        • <https://CRAN.R-project.org/package=geohabnet/>

        •
          <https://github.com/GarrettLab/HabitatConnectivity/tree/main/geohabnet/>

        • <https://www.garrettlab.com/>

        • Report bugs at
          <https://github.com/GarrettLab/HabitatConnectivity/issues>


sean                 package:geohabnet                 R Documentation

_S_e_n_s_i_t_i_v_i_t_y _a_n_a_l_y_s_i_s _a_c_r_o_s_s _m_a_p_s _o_f _h_a_b_i_t_a_t _c_o_n_n_e_c_t_i_v_i_t_y

_D_e_s_c_r_i_p_t_i_o_n:

     This function performs a sensitivity analysis across different
     values of habitat connectivity for each location in a map. For
     each combination of selected parameters, an index of habitat
     connectivity is calculated. 'sensitivity_analysis()' is a wrapper
     around 'sean()' function.

        • 'msean()' is a wrapper around 'sean()' function. It has
          additional argument to specify maps which are calculated
          using 'connectivity()' function. The maps are essentially the
          risk network.

_U_s_a_g_e:

     sean(
       rast,
       global = TRUE,
       geoscale = NULL,
       agg_methods = c("sum", "mean"),
       dist_method = "geodesic",
       link_threshold = 0,
       hd_threshold = 0,
       res = reso(),
       inv_pl = inv_powerlaw(NULL, betas = c(0.5, 1, 1.5), mets = c("betweeness",
         "NODE_STRENGTH", "Sum_of_nearest_neighbors", "eigenVector_centrAlitY"), we = c(50,
         15, 15, 20), linkcutoff = -1),
       neg_exp = neg_expo(NULL, gammas = c(0.05, 1, 0.2, 0.3), mets = c("betweeness",
         "NODE_STRENGTH", "Sum_of_nearest_neighbors", "eigenVector_centrAlitY"), we = c(50,
         15, 15, 20), linkcutoff = -1)
     )
     
     msean(
       rast,
       global = TRUE,
       geoscale = NULL,
       res = reso(),
       ...,
       outdir = tempdir()
     )
     
_A_r_g_u_m_e_n_t_s:

    rast: Raster object which will be used in analysis.

  global: Logical. 'TRUE' if global analysis, 'FALSE' otherwise.
          Default is 'TRUE'

geoscale: Numeric vector. Geographical coordinates in the form of
          c(Xmin, Xmax, Ymin, Ymax) which EPSG:4326 in coordinate
          reference system. If 'geoscale' is NuLL, the extent is
          extracted from 'rast'(SpatRaster) using 'terra::ext()'.

agg_methods: Character. One or both the values - SUM, MEAN. Aggregation
          strategy for scaling the input raster to the desired
          resolution.

dist_method: Character. The method to calculate the distance matrix.

link_threshold: Numeric. A threshold value for link weight. All link
          weights that are below this threshold will be replaced with
          zero for the connectivity analysis. Link weights represent
          the relative likelihood of pathogen, pest, or invasive
          species movement between a pair of host locations, which is
          calculated using gravity models based on host density (or
          availability) and dispersal kernels.

hd_threshold: Numeric. A threshold value for host density. All
          locations with a host density below the selected threshold
          will be excluded from the connectivity analysis, which
          focuses the analysis on the most important locations. The
          values for the host density threshold can range between 0 and
          1; if value is 1, all locations will be excluded from the
          analysis and 0 will include all locations in the analysis.
          Selecting a threshold for host density requires at least
          knowing what is the maximum value in the host density map to
          avoid excluding all locations in the analysis. if value is 1,
          all locations will be excluded from the analysis and 0 will
          include all locations in the analysis. Selecting a threshold
          for host density requires at least knowing what is the
          maximum value in the host density map to avoid excluding all
          locations in the analysis.

     res: Numeric. Resolution of the raster. Default is 'reso()'.

  inv_pl: List. A named list of parameters for inverse power law. See
          details.

 neg_exp: List. A named list of parameters for inverse negative
          exponential. See details. All locations with a host density
          below the selected threshold will be excluded from the
          connectivity analysis, which focuses the analysis on the most
          important locations. The values for the host density
          threshold can range between 0 and 1;

     ...: arguments passed to 'sean()'

  outdir: Character. Output directory for saving raster in TIFF format.
          Default is 'tempdir()'.

_D_e_t_a_i_l_s:

     When 'global = TRUE', 'geoscale' is ignored and 'global_scales()'
     is used by default.

     The functions 'sean()' and 'msean()' perform the same sensitivity
     analysis, but they differ in their return value. The return value
     of 'msean()' is 'GeoNetwork', which contains the result from
     applying the 'connectivity()' function on the habitat connectivity
     indexes. Essentially, the risk maps.

     If neither the inverse power law nor the negative exponential
     dispersal kernel is specified, the function will return an error.

     In 'msean()', three spatRasters are produced with the following
     values. For each location in the area of interest, the mean in
     habitat connectivity across selected parameters is calculated. For
     each location in the area of interest, the variance in habitat
     connectivity across selected parameters is calculated. For each
     location in the area of interest, the difference between the rank
     of habitat connectivity and the rank of host density is
     calculated. By default, each of these spatRasters is plotted for
     visualization.

_V_a_l_u_e:

     GeoRasters.

     GeoNetwork.

_R_e_f_e_r_e_n_c_e_s:

     Yanru Xing, John F Hernandez Nopsa, Kelsey F Andersen, Jorge L
     Andrade-Piedra, Fenton D Beed, Guy Blomme, Mónica Carvajal-Yepes,
     Danny L Coyne, Wilmer J Cuellar, Gregory A Forbes, Jan F Kreuze,
     Jürgen Kroschel, P Lava Kumar, James P Legg, Monica Parker, Elmar
     Schulte-Geldermann, Kalpana Sharma, Karen A Garrett, _Global
     Cropland connectivity: A Risk Factor for Invasion and Saturation
     by Emerging Pathogens and Pests_, BioScience, Volume 70, Issue 9,
     September 2020, Pages 744–758, doi:10.1093/biosci/biaa067
     <https://doi.org/10.1093/biosci/biaa067>

     Hijmans R (2023). _terra: Spatial Data Analysis_. R package
     version 1.7-46, <https://CRAN.R-project.org/package=terra>

_S_e_e _A_l_s_o:

     Uses 'connectivity()'

     Uses 'msean()' 'inv_powerlaw()' 'neg_expo()'

_E_x_a_m_p_l_e_s:

     avocado <- cropharvest_rast("avocado", "monfreda")
     
     # global
     ri <- sean(avocado) # returns a list of GeoRasters
     mri <- msean(rast = avocado) # returns GeoNetwork object
     
     # non-global
     # geoscale is a vector of xmin, xmax, ymin, ymax
     
     # returns GeoRasters object
     ri <- sean(avocado, global = FALSE, geoscale = c(-115, -75, 5, 32))
     ri
     
     # returns GeoNetwork object
     mri <- msean(rast = avocado, global = FALSE, geoscale = c(-115, -75, 5, 32))
     mri
     

trying URL 'https://s3.us-east-2.amazonaws.com/earthstatdata/HarvestedAreaYield175Crops_Indvidual_Geotiff/avocado_HarvAreaYield_Geotiff.zip'
Content type 'application/zip' length 6271196 bytes (6.0 MB)
==================================================
downloaded 6.0 MB

** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/geohabnet.Rcheck/vign_test/geohabnet/vignettes/analysis_files/figure-html/unnamed-chunk-6-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 6415 bytes
Input file size = 6493 bytes

Trying:
  zc = 9  zm = 8  zs = 0  f = 0		IDAT size = 5219
  zc = 9  zm = 8  zs = 1  f = 0
  zc = 1  zm = 8  zs = 2  f = 0
  zc = 9  zm = 8  zs = 3  f = 0
  zc = 9  zm = 8  zs = 0  f = 5
  zc = 9  zm = 8  zs = 1  f = 5
  zc = 1  zm = 8  zs = 2  f = 5
  zc = 9  zm = 8  zs = 3  f = 5
                               
Selecting parameters:
  zc = 9  zm = 8  zs = 0  f = 0		IDAT size = 5219

Output IDAT size = 5219 bytes (1196 bytes decrease)
Output file size = 5297 bytes (1196 bytes = 18.42% decrease)

trying URL 'https://dataverse.harvard.edu/api/access/datafile/3985008?format=original'

Quitting from lines 217-223 [fetch_sp_ba] (analysis.Rmd)
Error: processing vignette 'analysis.Rmd' failed with diagnostics:
unable to find an inherited method for function 'sources' for signature 'x = "NULL"'
--- failed re-building ‘analysis.Rmd’

SUMMARY: processing the following file failed:
  ‘analysis.Rmd’

Error: Vignette re-building failed.
Execution halted