Running ‘testthat.R’ [32s/59s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(mapme.biodiversity)
  > library(pbapply)
  > 
  > pboptions(type = "none")
  > 
  > temp_loc <- file.path(tempdir(), "mapme.biodiversity")
  > dir.create(temp_loc)
  > resource_dir <- system.file("res", package = "mapme.biodiversity")
  > file.copy(resource_dir, temp_loc, recursive = TRUE)
  [1] TRUE
  > 
  > test_check("mapme.biodiversity")
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Skipping existing files in output directory.
  Creating dataset /home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages/mapme.biodiversity/res/treecover2000/tileindex_treecover2000.gpkg failed.
  Starting process to download resource 'srtmdem'........
  Argument 'range_traveltime' for resource 'traveltime' was not specified. Setting to default value of '20k_50k'.
  Starting process to download resource 'traveltime'........
  Starting process to download resource 'traveltime'........
  The selected range 'not-available' is not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  <simpleError in .get_traveltime_url(range_traveltime, filenames): No supoorted ranges have been specified.>
  <simpleWarning: Download for resource traveltime failed. Returning unmodified portfolio object.>
  Starting process to download resource 'traveltime'........
  The selected ranges 'not-available', 'not-available2' are not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  <simpleError in .get_traveltime_url(range_traveltime, filenames): No supoorted ranges have been specified.>
  <simpleWarning: Download for resource traveltime failed. Returning unmodified portfolio object.>
  Starting process to download resource 'traveltime'........
  The selected range 'not-available' is not available ranges for traveltime Available ranges are 5k_10k, 10k_20k, 20k_50k, 50k_100k, 100k_200k, 200k_500k, 500k_1mio, 1mio_5mio, 50k_50mio, 5k_110mio, 20k_110mio.
  Reduced to the available range of 20k_50k.
  Starting process to download resource 'greenhouse'........
  Starting process to download resource 'lossyear'........
  <simpleError: Wrong version specified for lossyear resource. Select one of GFC-2015-v1.3.Wrong version specified for lossyear resource. Select one of GFC-2016-v1.4.Wrong version specified for lossyear resource. Select one of GFC-2017-v1.5.Wrong version specified for lossyear resource. Select one of GFC-2018-v1.6.Wrong version specified for lossyear resource. Select one of GFC-2019-v1.7.Wrong version specified for lossyear resource. Select one of GFC-2020-v1.8.>
  <simpleWarning: Download for resource lossyear failed. Returning unmodified portfolio object.>
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Starting process to download resource 'treecover2000'........
  Skipping existing files in output directory.
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Skipping existing files in output directory.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Starting process to download resource 'lossyear'........
  <simpleError: Wrong version specified for lossyear resource. Select one of GFC-2015-v1.3.Wrong version specified for lossyear resource. Select one of GFC-2016-v1.4.Wrong version specified for lossyear resource. Select one of GFC-2017-v1.5.Wrong version specified for lossyear resource. Select one of GFC-2018-v1.6.Wrong version specified for lossyear resource. Select one of GFC-2019-v1.7.Wrong version specified for lossyear resource. Select one of GFC-2020-v1.8.>
  <simpleWarning: Download for resource lossyear failed. Returning unmodified portfolio object.>
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Skipping existing files in output directory.
  Argument 'vers_lossyear' for resource 'lossyear' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'lossyear'........
  Skipping existing files in output directory.
  Starting process to download resource 'greenhouse'........
  Skipping existing files in output directory.
  Starting process to download resource 'treecover2000'........
  <simpleError: Wrong version specified for treecover resource. Select one of GFC-2015-v1.3, GFC-2016-v1.4, GFC-2017-v1.5, GFC-2018-v1.6, GFC-2019-v1.7, GFC-2020-v1.8.>
  <simpleWarning: Download for resource treecover2000 failed. Returning unmodified portfolio object.>
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Starting process to download resource 'treecover2000'........
  Starting process to download resource 'worldpop'........
  sh: 1: /no-valid-bin: not found
  The following requested resource is already available: treecover2000.
  Argument 'vers_treecover' for resource 'treecover2000' was not specified. Setting to default value of 'GFC-2020-v1.8'.
  Some target years are not available for treecover.
  Some target years are not available for treecover.
  Checking URLs for existence. This may take a while...
  Checking URLs for existence. This may take a while...
  Skipping existing files in output directory.
  Checking URLs for existence. This may take a while...
  [ FAIL 1 | WARN 1 | SKIP 24 | PASS 108 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (24)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-calc_indicator.R:23:3): multiplication works ────────────────────
  <Rcpp::exception/C++Error/error/condition>
  Error in `CPL_write_ogr(obj, dsn, layer, driver, as.character(dataset_options), 
      as.character(layer_options), geom, dim, fids, config_options, 
      quiet, append, delete_dsn, delete_layer, write_geometries, 
      getOption("width"))`: Creation failed.
  
  Backtrace:
      ▆
   1. └─mapme.biodiversity::get_resources(...) at test-calc_indicator.R:23:2
   2.   └─mapme.biodiversity:::.get_single_resource(x, resource, ...)
   3.     └─sf::write_sf(footprints, dsn = tindex_file)
   4.       ├─sf::st_write(..., quiet = quiet, append = append, delete_layer = delete_layer)
   5.       └─sf:::st_write.sf(..., quiet = quiet, append = append, delete_layer = delete_layer)
   6.         └─sf:::CPL_write_ogr(...)
  
  [ FAIL 1 | WARN 1 | SKIP 24 | PASS 108 ]
  Error: Test failures
  Execution halted