* using log directory 'd:/Rcompile/CRANpkg/local/4.0/windfarmGA.Rcheck'
* using R version 4.0.5 (2021-03-31)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* checking for file 'windfarmGA/DESCRIPTION' ... OK
* this is package 'windfarmGA' version '3.0.0'
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'windfarmGA' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
** checking loading without being on the library search path ... OK
** checking use of S3 registration ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... [17s] OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking pragmas in C/C++ headers and code ... OK
* checking compiled code ... OK
* checking examples ...
** running examples for arch 'i386' ... [7s] ERROR
Running examples in 'windfarmGA-Ex.R' failed
The error most likely occurred in:

> ### Name: hexa_area
> ### Title: Polygon to Hexagonal Grid Tessellation
> ### Aliases: hexa_area
> 
> ### ** Examples
> 
> library(sf)
Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
> ## Exemplary input Polygon with 2km x 2km:
> Poly <- sf::st_as_sf(sf::st_sfc(
+   sf::st_polygon(list(cbind(
+     c(4498482, 4498482, 4499991, 4499991, 4498482),
+     c(2668272, 2669343, 2669343, 2668272, 2668272)))), 
+   crs = 3035
+ ))
> HexGrid <- hexa_area(Poly, 100, TRUE)
Error in `[.default`(grid_polys, indx, ) : incorrect number of dimensions
Calls: hexa_area -> [ -> [.sfc -> st_sfc -> NextMethod
Execution halted
** running examples for arch 'x64' ... [7s] ERROR
Running examples in 'windfarmGA-Ex.R' failed
The error most likely occurred in:

> ### Name: hexa_area
> ### Title: Polygon to Hexagonal Grid Tessellation
> ### Aliases: hexa_area
> 
> ### ** Examples
> 
> library(sf)
Linking to GEOS 3.9.0, GDAL 3.2.1, PROJ 7.2.1
> ## Exemplary input Polygon with 2km x 2km:
> Poly <- sf::st_as_sf(sf::st_sfc(
+   sf::st_polygon(list(cbind(
+     c(4498482, 4498482, 4499991, 4499991, 4498482),
+     c(2668272, 2669343, 2669343, 2668272, 2668272)))), 
+   crs = 3035
+ ))
> HexGrid <- hexa_area(Poly, 100, TRUE)
Error in `[.default`(grid_polys, indx, ) : incorrect number of dimensions
Calls: hexa_area -> [ -> [.sfc -> st_sfc -> NextMethod
Execution halted
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ... [21s] ERROR
  Running 'testthat.R' [21s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(windfarmGA)
  > library(rgdal)
  Loading required package: sp
  rgdal: version: 1.5-23, (SVN revision 1121)
  Geospatial Data Abstraction Library extensions to R successfully loaded
  Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
  Path to GDAL shared files: D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/gdal
  GDAL binary built with GEOS: TRUE 
  Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
  Path to PROJ shared files: D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/proj
  PROJ CDN enabled: FALSE
  Linking to sp version:1.4-5
  To mute warnings of possible GDAL/OSR exportToProj4() degradation,
  use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
  Overwritten PROJ_LIB was D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/proj
  > library(rgeos)
  rgeos version: 0.5-5, (SVN revision 640)
   GEOS runtime version: 3.8.0-CAPI-1.13.1 
   Linking to sp version: 1.4-5 
   Polygon checking: TRUE 
  
  > 
  > test_check("windfarmGA")
   [1] "ABBREV"       "ADM0_A3"      "ADM0_DIF"     "ADMIN"        "ADMIN.1"     
   [6] "AVOIDname"    "AVOIDnumeric" "FIPS_10_"     "FeatureCla"   "GBD"         
  [11] "GDP_MD_EST"   "GEO3"         "GEO3major"    "GEOUNIT"      "GEOU_DIF"    
  [16] "GLOCAF"       "GU_A3"        "IMAGE24"      "ISO3"         "ISO3.1"      
  [21] "ISO_A2"       "ISO_A3"       "ISO_N3"       "LAT"          "LDC"         
  [26] "LEVEL"        "LLDC"         "LON"          "LabelRank"    "MAP_COLOR"   
  [31] "NAME"         "NAME_FORMA"   "NAME_SORT"    "POP_EST"      "POSTAL"      
  [36] "REGION"       "SID"          "SOVEREIGNT"   "SOV_A3"       "SRES"        
  [41] "SRESmajor"    "SUBUNIT"      "SU_A3"        "SU_DIF"       "ScaleRank"   
  [46] "Stern"        "TERR_"        "TYPE"         "continent"   
  Enter an ISO3 code: trying URL 'https://biogeo.ucdavis.edu/data/diva/msk_alt/AUT_msk_alt.zip'
  Content type 'application/zip' length 216165 bytes (211 KB)
  ==================================================
  downloaded 211 KB
  
  == Skipped tests ===============================================================
  * On CRAN (4)
  * On Windows (1)
  
  == Failed tests ================================================================
  -- Error (test_ga_func.R:46:3): Test Genetic Algorithm Function ----------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::grid_area(shape = Polygon1, size = 200, prop = 1) test_ga_func.R:46:2
   2.   +-grid_intersect[indx, ]
   3.   +-sf:::`[.sfc`(grid_intersect, indx, )
   4.   | \-sf::st_sfc(...)
   5.   \-base::NextMethod()
  -- Error (test_random_search.R:14:3): Test Random Search Functions -------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::random_search(...) test_random_search.R:14:2
   2.   \-windfarmGA::grid_area(shape = Polygon1, size = resolu, prop = propu)
   3.     +-grid_intersect[indx, ]
   4.     +-sf:::`[.sfc`(grid_intersect, indx, )
   5.     | \-sf::st_sfc(...)
   6.     \-base::NextMethod()
  -- Error (test_user_input.R:22:3): User Input ----------------------------------
  Error: Evaluation error: Found 5 features with invalid spherical geometry.
  [12] Loop 0 is not valid: Edge 743 crosses edge 998
  [20] Loop 0 is not valid: Edge 130 crosses edge 132
  [39] Loop 0 is not valid: Edge 3145 has duplicate vertex with edge 3148
  [100] Loop 0 is not valid: Edge 1356 has duplicate vertex with edge 1359
  [123] Loop 0 is not valid: Edge 139 has duplicate vertex with edge 142.
  Backtrace:
       x
    1. \-windfarmGA::getISO3(pp = points, crs_pp = 3035, col = "?") test_user_input.R:22:2
    2.   +-base::suppressWarnings(st_intersection(pp, st_as_sf(countriesSP)))
    3.   | \-base::withCallingHandlers(...)
    4.   +-sf::st_intersection(pp, st_as_sf(countriesSP))
    5.   \-sf:::st_intersection.sf(pp, st_as_sf(countriesSP))
    6.     +-sf:::geos_op2_df(x, y, geos_op2_geom("intersection", x, y))
    7.     \-sf:::geos_op2_geom("intersection", x, y)
    8.       +-base::structure(...)
    9.       +-base::unlist(...)
   10.       \-base::lapply(x, fn, y, s2::s2_options(model = s2_model, ...))
   11.         \-s2:::FUN(X[[i]], ...)
   12.           +-s2:::recycle_common(as_s2_geography(x), as_s2_geography(y))
   13.           +-s2::as_s2_geography(y)
   14.           \-sf:::as_s2_geography.sfc(y)
   15.             \-sf:::st_as_s2.sfc(x, ..., oriented = oriented)
   16.               +-s2::as_s2_geography(st_as_binary(x), ..., oriented = oriented)
   17.               \-s2:::as_s2_geography.WKB(st_as_binary(x), ..., oriented = oriented)
   18.                 +-s2:::new_s2_xptr(...)
   19.                 \-s2:::s2_geography_from_wkb(x, oriented = oriented, check = check)
  -- Error (test_visibility.R:36:3): Test Viewshed Functions ---------------------
  Error: Evaluation error: Found 5 features with invalid spherical geometry.
  [12] Loop 0 is not valid: Edge 743 crosses edge 998
  [20] Loop 0 is not valid: Edge 130 crosses edge 132
  [39] Loop 0 is not valid: Edge 3145 has duplicate vertex with edge 3148
  [100] Loop 0 is not valid: Edge 1356 has duplicate vertex with edge 1359
  [123] Loop 0 is not valid: Edge 139 has duplicate vertex with edge 142.
  Backtrace:
       x
    1. \-windfarmGA::getISO3(pp = points, crs_pp = 3035) test_visibility.R:36:2
    2.   +-base::suppressWarnings(st_intersection(pp, st_as_sf(countriesSP)))
    3.   | \-base::withCallingHandlers(...)
    4.   +-sf::st_intersection(pp, st_as_sf(countriesSP))
    5.   \-sf:::st_intersection.sf(pp, st_as_sf(countriesSP))
    6.     +-sf:::geos_op2_df(x, y, geos_op2_geom("intersection", x, y))
    7.     \-sf:::geos_op2_geom("intersection", x, y)
    8.       +-base::structure(...)
    9.       +-base::unlist(...)
   10.       \-base::lapply(x, fn, y, s2::s2_options(model = s2_model, ...))
   11.         \-s2:::FUN(X[[i]], ...)
   12.           +-s2:::recycle_common(as_s2_geography(x), as_s2_geography(y))
   13.           +-s2::as_s2_geography(y)
   14.           \-sf:::as_s2_geography.sfc(y)
   15.             \-sf:::st_as_s2.sfc(x, ..., oriented = oriented)
   16.               +-s2::as_s2_geography(st_as_binary(x), ..., oriented = oriented)
   17.               \-s2:::as_s2_geography.WKB(st_as_binary(x), ..., oriented = oriented)
   18.                 +-s2:::new_s2_xptr(...)
   19.                 \-s2:::s2_geography_from_wkb(x, oriented = oriented, check = check)
  -- Error (test_wake.R:113:3): Test Wake Functions ------------------------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::grid_area(...) test_wake.R:113:2
   2.   +-grid_intersect[indx, ]
   3.   +-sf:::`[.sfc`(grid_intersect, indx, )
   4.   | \-sf::st_sfc(...)
   5.   \-base::NextMethod()
  
  [ FAIL 5 | WARN 0 | SKIP 5 | PASS 130 ]
  Error: Test failures
  Execution halted
** running tests for arch 'x64' ... [18s] ERROR
  Running 'testthat.R' [18s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(windfarmGA)
  > library(rgdal)
  Loading required package: sp
  rgdal: version: 1.5-23, (SVN revision 1121)
  Geospatial Data Abstraction Library extensions to R successfully loaded
  Loaded GDAL runtime: GDAL 3.2.1, released 2020/12/29
  Path to GDAL shared files: D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/gdal
  GDAL binary built with GEOS: TRUE 
  Loaded PROJ runtime: Rel. 7.2.1, January 1st, 2021, [PJ_VERSION: 721]
  Path to PROJ shared files: D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/proj
  PROJ CDN enabled: FALSE
  Linking to sp version:1.4-5
  To mute warnings of possible GDAL/OSR exportToProj4() degradation,
  use options("rgdal_show_exportToProj4_warnings"="none") before loading rgdal.
  Overwritten PROJ_LIB was D:/temp/Rtmp2fAszy/RLIBS_17a1413954ed8/rgdal/proj
  > library(rgeos)
  rgeos version: 0.5-5, (SVN revision 640)
   GEOS runtime version: 3.8.0-CAPI-1.13.1 
   Linking to sp version: 1.4-5 
   Polygon checking: TRUE 
  
  > 
  > test_check("windfarmGA")
   [1] "ABBREV"       "ADM0_A3"      "ADM0_DIF"     "ADMIN"        "ADMIN.1"     
   [6] "AVOIDname"    "AVOIDnumeric" "FIPS_10_"     "FeatureCla"   "GBD"         
  [11] "GDP_MD_EST"   "GEO3"         "GEO3major"    "GEOUNIT"      "GEOU_DIF"    
  [16] "GLOCAF"       "GU_A3"        "IMAGE24"      "ISO3"         "ISO3.1"      
  [21] "ISO_A2"       "ISO_A3"       "ISO_N3"       "LAT"          "LDC"         
  [26] "LEVEL"        "LLDC"         "LON"          "LabelRank"    "MAP_COLOR"   
  [31] "NAME"         "NAME_FORMA"   "NAME_SORT"    "POP_EST"      "POSTAL"      
  [36] "REGION"       "SID"          "SOVEREIGNT"   "SOV_A3"       "SRES"        
  [41] "SRESmajor"    "SUBUNIT"      "SU_A3"        "SU_DIF"       "ScaleRank"   
  [46] "Stern"        "TERR_"        "TYPE"         "continent"   
  Enter an ISO3 code: trying URL 'https://biogeo.ucdavis.edu/data/diva/msk_alt/AUT_msk_alt.zip'
  Content type 'application/zip' length 216165 bytes (211 KB)
  ==================================================
  downloaded 211 KB
  
  == Skipped tests ===============================================================
  * On CRAN (4)
  * On Windows (1)
  
  == Failed tests ================================================================
  -- Error (test_ga_func.R:46:3): Test Genetic Algorithm Function ----------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::grid_area(shape = Polygon1, size = 200, prop = 1) test_ga_func.R:46:2
   2.   +-grid_intersect[indx, ]
   3.   +-sf:::`[.sfc`(grid_intersect, indx, )
   4.   | \-sf::st_sfc(...)
   5.   \-base::NextMethod()
  -- Error (test_random_search.R:14:3): Test Random Search Functions -------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::random_search(...) test_random_search.R:14:2
   2.   \-windfarmGA::grid_area(shape = Polygon1, size = resolu, prop = propu)
   3.     +-grid_intersect[indx, ]
   4.     +-sf:::`[.sfc`(grid_intersect, indx, )
   5.     | \-sf::st_sfc(...)
   6.     \-base::NextMethod()
  -- Error (test_user_input.R:22:3): User Input ----------------------------------
  Error: Evaluation error: Found 5 features with invalid spherical geometry.
  [12] Loop 0 is not valid: Edge 743 crosses edge 998
  [20] Loop 0 is not valid: Edge 130 crosses edge 132
  [39] Loop 0 is not valid: Edge 3145 has duplicate vertex with edge 3148
  [100] Loop 0 is not valid: Edge 1356 has duplicate vertex with edge 1359
  [123] Loop 0 is not valid: Edge 139 has duplicate vertex with edge 142.
  Backtrace:
       x
    1. \-windfarmGA::getISO3(pp = points, crs_pp = 3035, col = "?") test_user_input.R:22:2
    2.   +-base::suppressWarnings(st_intersection(pp, st_as_sf(countriesSP)))
    3.   | \-base::withCallingHandlers(...)
    4.   +-sf::st_intersection(pp, st_as_sf(countriesSP))
    5.   \-sf:::st_intersection.sf(pp, st_as_sf(countriesSP))
    6.     +-sf:::geos_op2_df(x, y, geos_op2_geom("intersection", x, y))
    7.     \-sf:::geos_op2_geom("intersection", x, y)
    8.       +-base::structure(...)
    9.       +-base::unlist(...)
   10.       \-base::lapply(x, fn, y, s2::s2_options(model = s2_model, ...))
   11.         \-s2:::FUN(X[[i]], ...)
   12.           +-s2:::recycle_common(as_s2_geography(x), as_s2_geography(y))
   13.           +-s2::as_s2_geography(y)
   14.           \-sf:::as_s2_geography.sfc(y)
   15.             \-sf:::st_as_s2.sfc(x, ..., oriented = oriented)
   16.               +-s2::as_s2_geography(st_as_binary(x), ..., oriented = oriented)
   17.               \-s2:::as_s2_geography.WKB(st_as_binary(x), ..., oriented = oriented)
   18.                 +-s2:::new_s2_xptr(...)
   19.                 \-s2:::s2_geography_from_wkb(x, oriented = oriented, check = check)
  -- Error (test_visibility.R:36:3): Test Viewshed Functions ---------------------
  Error: Evaluation error: Found 5 features with invalid spherical geometry.
  [12] Loop 0 is not valid: Edge 743 crosses edge 998
  [20] Loop 0 is not valid: Edge 130 crosses edge 132
  [39] Loop 0 is not valid: Edge 3145 has duplicate vertex with edge 3148
  [100] Loop 0 is not valid: Edge 1356 has duplicate vertex with edge 1359
  [123] Loop 0 is not valid: Edge 139 has duplicate vertex with edge 142.
  Backtrace:
       x
    1. \-windfarmGA::getISO3(pp = points, crs_pp = 3035) test_visibility.R:36:2
    2.   +-base::suppressWarnings(st_intersection(pp, st_as_sf(countriesSP)))
    3.   | \-base::withCallingHandlers(...)
    4.   +-sf::st_intersection(pp, st_as_sf(countriesSP))
    5.   \-sf:::st_intersection.sf(pp, st_as_sf(countriesSP))
    6.     +-sf:::geos_op2_df(x, y, geos_op2_geom("intersection", x, y))
    7.     \-sf:::geos_op2_geom("intersection", x, y)
    8.       +-base::structure(...)
    9.       +-base::unlist(...)
   10.       \-base::lapply(x, fn, y, s2::s2_options(model = s2_model, ...))
   11.         \-s2:::FUN(X[[i]], ...)
   12.           +-s2:::recycle_common(as_s2_geography(x), as_s2_geography(y))
   13.           +-s2::as_s2_geography(y)
   14.           \-sf:::as_s2_geography.sfc(y)
   15.             \-sf:::st_as_s2.sfc(x, ..., oriented = oriented)
   16.               +-s2::as_s2_geography(st_as_binary(x), ..., oriented = oriented)
   17.               \-s2:::as_s2_geography.WKB(st_as_binary(x), ..., oriented = oriented)
   18.                 +-s2:::new_s2_xptr(...)
   19.                 \-s2:::s2_geography_from_wkb(x, oriented = oriented, check = check)
  -- Error (test_wake.R:113:3): Test Wake Functions ------------------------------
  Error: incorrect number of dimensions
  Backtrace:
      x
   1. \-windfarmGA::grid_area(...) test_wake.R:113:2
   2.   +-grid_intersect[indx, ]
   3.   +-sf:::`[.sfc`(grid_intersect, indx, )
   4.   | \-sf::st_sfc(...)
   5.   \-base::NextMethod()
  
  [ FAIL 5 | WARN 0 | SKIP 5 | PASS 130 ]
  Error: Test failures
  Execution halted
* checking PDF version of manual ... OK
* DONE
Status: 4 ERRORs
