* using log directory ‘/data/gannet/ripley/R/packages/tests-ATLAS/windfarmGA.Rcheck’ * using R Under development (unstable) (2021-06-11 r80486) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * 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 executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘windfarmGA’ can be installed ... [46s/56s] 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 * 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 ... [34s/34s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... 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 LazyData ... 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 compilation flags used ... OK * checking compiled code ... OK * checking examples ... 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.8.1, GDAL 3.0.4, PROJ 6.3.2 > ## 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 ‘testthat.R’ [15s/18s] [16s/19s] ERROR 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.0.4, released 2020/01/28 Path to GDAL shared files: /usr/share/gdal GDAL binary built with GEOS: TRUE Loaded PROJ runtime: Rel. 6.3.2, May 1st, 2020, [PJ_VERSION: 632] Path to PROJ shared files: /usr/share/proj 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. > library(rgeos) rgeos version: 0.5-5, (SVN revision 640) GEOS runtime version: 3.8.1-CAPI-1.13.3 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) ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error (test_ga_func.R:46:3): Test Genetic Algorithm Function ──────────────── Error: incorrect number of dimensions Backtrace: █ 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_parallel.R:19:3): Test Parallelisation ────────────────────────── Error: incorrect number of dimensions Backtrace: █ 1. └─windfarmGA::genetic_algorithm(...) test_parallel.R:19:2 2. └─windfarmGA::grid_area(Polygon1, resol2, Proportionality) 3. ├─grid_intersect[indx, ] 4. ├─sf:::`[.sfc`(grid_intersect, indx, ) 5. │ └─sf::st_sfc(...) 6. └─base::NextMethod() ── Error (test_random_search.R:14:3): Test Random Search Functions ───────────── Error: incorrect number of dimensions Backtrace: █ 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: █ 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: █ 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) ── Failure (test_wake.R:71:3): Test Wake Functions ───────────────────────────── nrow(df1) > nrow(df) is not TRUE `actual`: FALSE `expected`: TRUE ── Error (test_wake.R:113:3): Test Wake Functions ────────────────────────────── Error: incorrect number of dimensions Backtrace: █ 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 7 | WARN 0 | SKIP 4 | PASS 129 ] Error: Test failures Execution halted * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 2 ERRORs See ‘/data/gannet/ripley/R/packages/tests-ATLAS/windfarmGA.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:38.97, 184.10 + 12.05