* using log directory 'd:/Rcompile/CRANpkg/local/4.1/rmapshaper.Rcheck' * using R version 4.1.3 (2022-03-10) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'rmapshaper/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'rmapshaper' version '0.5.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 'rmapshaper' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' 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 ... [8s] NOTE Initiating curl with CURL_SSL_BACKEND: openssl * checking Rd files ... [1s] 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 installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [3s] ERROR Running examples in 'rmapshaper-Ex.R' failed The error most likely occurred in: > ### Name: apply_mapshaper_commands > ### Title: Apply a mapshaper command string to a geojson object > ### Aliases: apply_mapshaper_commands > > ### ** Examples > > > nc <- sf::read_sf(system.file("gpkg/nc.gpkg", package = "sf")) > rmapshaper::apply_mapshaper_commands(geojsonsf::sf_geojson(nc), "-clean") Error: SyntaxError: Unexpected token . Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [18s] ERROR Running 'testthat.R' [18s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/tests.html > # * https://testthat.r-lib.org/reference/test_package.html#special-files > > library(testthat) > library(rmapshaper) Initiating curl with CURL_SSL_BACKEND: openssl > > test_check("rmapshaper") [ FAIL 52 | WARN 0 | SKIP 17 | PASS 53 ] == Skipped tests =============================================================== * Not old v8 (1) * On CRAN (9) * has_sys_mapshaper() is not TRUE (6) * possible bug in mapshaper https://github.com/mbloch/mapshaper/issues/487 (1) == Failed tests ================================================================ -- Error ('test-clip_erase.R:3:3'): ms_clip.geojson works ---------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_clip(ce_poly, ce_inner_poly) at test-clip_erase.R:3:2 2. \-rmapshaper:::ms_clip.json(ce_poly, ce_inner_poly) 3. \-rmapshaper:::clip_erase_json(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:21:3'): ms_clip.character works ------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_clip(unclass(ce_poly), unclass(ce_inner_poly)) at test-clip_erase.R:21:2 2. \-rmapshaper:::ms_clip.character(unclass(ce_poly), unclass(ce_inner_poly)) 3. \-rmapshaper:::clip_erase_json(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:30:3'): ms_erase.geojson works -------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_erase(ce_poly, ce_inner_poly) at test-clip_erase.R:30:2 2. \-rmapshaper:::ms_erase.json(ce_poly, ce_inner_poly) 3. \-rmapshaper:::clip_erase_json(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:42:3'): ms_erase.character works ------------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_erase(unclass(ce_poly), unclass(ce_inner_poly)) at test-clip_erase.R:42:2 2. \-rmapshaper:::ms_erase.character(unclass(ce_poly), unclass(ce_inner_poly)) 3. \-rmapshaper:::clip_erase_json(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:52:3'): ms_clip.SpatialPolygons works ------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_clip(ce_poly_spdf, ce_inner_poly_spdf) at test-clip_erase.R:52:2 2. \-rmapshaper:::ms_clip.SpatialPolygons(ce_poly_spdf, ce_inner_poly_spdf) 3. \-rmapshaper:::clip_erase_sp(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:67:3'): ms_erase.SpatialPolygons works ------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_erase(ce_poly_spdf, ce_inner_poly_spdf) at test-clip_erase.R:67:2 2. \-rmapshaper:::ms_erase.SpatialPolygons(ce_poly_spdf, ce_inner_poly_spdf) 3. \-rmapshaper:::clip_erase_sp(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:138:3'): bbox works ------------------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_erase(ce_poly, bbox = c(51, -45, 55, -40)) at test-clip_erase.R:138:2 2. \-rmapshaper:::ms_erase.json(ce_poly, bbox = c(51, -45, 55, -40)) 3. \-rmapshaper:::clip_erase_json(...) 4. \-rmapshaper:::mapshaper_clip_erase(...) 5. \-rmapshaper::apply_mapshaper_commands(...) 6. \-rmapshaper:::ms_make_ctx() 7. \-ctx$source(...) 8. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 9. +-V8:::get_str_output(...) 10. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:159:3'): clip works with sf objects --------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-clip_erase.R:159:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_clip(ce_poly_sf, ce_inner_poly_sf) 5. \-rmapshaper:::ms_clip.sf(ce_poly_sf, ce_inner_poly_sf) 6. \-rmapshaper:::clip_erase_sf(...) 7. \-rmapshaper:::mapshaper_clip_erase(...) 8. \-rmapshaper:::ms_make_ctx() 9. \-ctx$source(...) 10. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 11. +-V8:::get_str_output(...) 12. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-clip_erase.R:172:3'): erase works with sf objects -------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-clip_erase.R:172:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_erase(ce_poly_sf, ce_inner_poly_sf) 5. \-rmapshaper:::ms_erase.sf(ce_poly_sf, ce_inner_poly_sf) 6. \-rmapshaper:::clip_erase_sf(...) 7. \-rmapshaper:::mapshaper_clip_erase(...) 8. \-rmapshaper:::ms_make_ctx() 9. \-ctx$source(...) 10. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 11. +-V8:::get_str_output(...) 12. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:13:3'): ms_dissolve.geojson works ------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_dissolve(poly) at test-dissolve.R:13:2 2. \-rmapshaper:::ms_dissolve.json(poly) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:31:3'): ms_dissolve.character works ----------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_dissolve(unclass(poly)) at test-dissolve.R:31:2 2. \-rmapshaper:::ms_dissolve.character(unclass(poly)) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:42:3'): ms_dissolve.SpatialPolygons works ----------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_dissolve(poly_spdf) at test-dissolve.R:42:2 2. \-rmapshaper:::ms_dissolve.SpatialPolygons(poly_spdf) 3. \-rmapshaper:::dissolve_sp(...) 4. \-rmapshaper:::ms_sp(input = input, call = call, ...) 5. \-rmapshaper::apply_mapshaper_commands(...) 6. \-rmapshaper:::ms_make_ctx() 7. \-ctx$source(...) 8. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 9. +-V8:::get_str_output(...) 10. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:75:3'): ms_dissolve.sf works with points ------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(ms_dissolve(points_sf), "sf") at test-dissolve.R:75:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_dissolve(points_sf) 5. \-rmapshaper:::ms_dissolve.sf(points_sf) 6. \-rmapshaper:::dissolve_sf(...) 7. \-rmapshaper:::ms_sf(input = input, call = call, ...) 8. \-rmapshaper::apply_mapshaper_commands(...) 9. \-rmapshaper:::ms_make_ctx() 10. \-ctx$source(...) 11. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 12. +-V8:::get_str_output(...) 13. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:80:3'): ms_dissolve.sf works with polygons ---------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(ms_dissolve(poly_sf), "sf") at test-dissolve.R:80:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_dissolve(poly_sf) 5. \-rmapshaper:::ms_dissolve.sf(poly_sf) 6. \-rmapshaper:::dissolve_sf(...) 7. \-rmapshaper:::ms_sf(input = input, call = call, ...) 8. \-rmapshaper::apply_mapshaper_commands(...) 9. \-rmapshaper:::ms_make_ctx() 10. \-ctx$source(...) 11. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 12. +-V8:::get_str_output(...) 13. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-dissolve.R:88:3'): weight argument works ----------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_warning(ms_dissolve(points, weight = "w"), "The command returned an empty response.") at test-dissolve.R:88:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_dissolve(points, weight = "w") 8. \-rmapshaper:::ms_dissolve.json(points, weight = "w") 9. \-rmapshaper::apply_mapshaper_commands(...) 10. \-rmapshaper:::ms_make_ctx() 11. \-ctx$source(...) 12. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 13. +-V8:::get_str_output(...) 14. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-explode.R:27:3'): ms_explode.geojson works --------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_explode(multi_poly) at test-explode.R:27:2 2. \-rmapshaper:::ms_explode.json(multi_poly) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-explode.R:40:3'): ms_explode.character works ------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_explode(unclass(multi_poly)) at test-explode.R:40:2 2. \-rmapshaper:::ms_explode.character(unclass(multi_poly)) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-explode.R:48:3'): ms_explode.SpatialPolygonsDataFrame works ---- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_explode(spdf) at test-explode.R:48:2 2. \-rmapshaper:::ms_explode.SpatialPolygons(spdf) 3. \-rmapshaper:::explode_sp(input, ...) 4. \-rmapshaper:::ms_sp(input = input, call = "-explode", ...) 5. \-rmapshaper::apply_mapshaper_commands(...) 6. \-rmapshaper:::ms_make_ctx() 7. \-ctx$source(...) 8. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 9. +-V8:::get_str_output(...) 10. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-explode.R:75:3'): ms_explode works with sf --------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_explode(mp_sf) at test-explode.R:75:2 2. \-rmapshaper:::ms_explode.sf(mp_sf) 3. \-rmapshaper:::explode_sf(input = input, ...) 4. \-rmapshaper:::ms_sf(input = input, call = "-explode", ...) 5. \-rmapshaper::apply_mapshaper_commands(...) 6. \-rmapshaper:::ms_make_ctx() 7. \-ctx$source(...) 8. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 9. +-V8:::get_str_output(...) 10. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_fields.R:17:3'): ms_filter_fields works with polygons --- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(ms_filter_fields(poly, "a"), "geojson") at test-filter_fields.R:17:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_fields(poly, "a") 5. \-rmapshaper:::ms_filter_fields.json(poly, "a") 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_fields.R:32:3'): ms_filter_fields works with points ----- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-filter_fields.R:32:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_fields(pts, c("x", "y")) 5. \-rmapshaper:::ms_filter_fields.json(pts, c("x", "y")) 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_fields.R:42:3'): ms_filter_fields works with lines ------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-filter_fields.R:42:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_fields(lines, c("a", "b")) 5. \-rmapshaper:::ms_filter_fields.json(lines, c("a", "b")) 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_fields.R:52:3'): ms_filter_fields fails correctly ------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_warning(ms_filter_fields(poly, "d"), "The command returned an empty response") at test-filter_fields.R:52:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_filter_fields(poly, "d") 8. \-rmapshaper:::ms_filter_fields.json(poly, "d") 9. \-rmapshaper::apply_mapshaper_commands(...) 10. \-rmapshaper:::ms_make_ctx() 11. \-ctx$source(...) 12. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 13. +-V8:::get_str_output(...) 14. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_islands.R:21:3'): ms_filter_islands works with min_area -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-filter_islands.R:21:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_islands(islands_poly, min_area = 12391399903) 5. \-rmapshaper:::ms_filter_islands.json(islands_poly, min_area = 12391399903) 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_islands.R:42:3'): ms_filter_islands works with min_vertoces -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-filter_islands.R:42:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_islands(islands_poly, min_vertices = 4) 5. \-rmapshaper:::ms_filter_islands.json(islands_poly, min_vertices = 4) 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-filter_islands.R:56:3'): ms_filter_islands works drop_null_geometries = FALSE -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-filter_islands.R:56:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_filter_islands(...) 5. \-rmapshaper:::ms_filter_islands.json(...) 6. \-rmapshaper::apply_mapshaper_commands(...) 7. \-rmapshaper:::ms_make_ctx() 8. \-ctx$source(...) 9. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 10. +-V8:::get_str_output(...) 11. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-innerlines.R:2:3'): ms_innerlines works with all classes ------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_innerlines(innerlines_poly) at test-innerlines.R:2:2 2. \-rmapshaper:::ms_innerlines.json(innerlines_poly) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-innerlines.R:21:3'): ms_innerlines errors correctly ------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_warning(...) at test-innerlines.R:21:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_innerlines(ms_lines(innerlines_poly)) 8. +-rmapshaper::ms_lines(innerlines_poly) 9. \-rmapshaper:::ms_lines.json(innerlines_poly) 10. \-rmapshaper::apply_mapshaper_commands(...) 11. \-rmapshaper:::ms_make_ctx() 12. \-ctx$source(...) 13. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 14. +-V8:::get_str_output(...) 15. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-lines.R:2:3'): ms_lines works with all classes ----------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_lines(innerlines_poly) at test-lines.R:2:2 2. \-rmapshaper:::ms_lines.json(innerlines_poly) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-lines.R:20:3'): ms_lines works with fields specified ----------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_lines(innerlines_poly, "foo") at test-lines.R:20:2 2. \-rmapshaper:::ms_lines.json(innerlines_poly, "foo") 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-lines.R:36:3'): ms_lines errors correctly ---------------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_warning(ms_lines(innerlines_poly, "bar"), "The command returned an empty response") at test-lines.R:36:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_lines(innerlines_poly, "bar") 8. \-rmapshaper:::ms_lines.json(innerlines_poly, "bar") 9. \-rmapshaper::apply_mapshaper_commands(...) 10. \-rmapshaper:::ms_make_ctx() 11. \-ctx$source(...) 12. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 13. +-V8:::get_str_output(...) 14. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-points.R:11:3'): ms_points works with defaults ----------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_points(poly_geojson) at test-points.R:11:2 2. \-rmapshaper:::ms_points.json(poly_geojson) 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-points.R:33:3'): ms_points works with defaults with sf --------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_points(poly_sf) at test-points.R:33:2 2. \-rmapshaper:::ms_points.sf(poly_sf) 3. \-rmapshaper:::ms_sf(input, cmd, ...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-points.R:48:3'): ms_points works with location=centroid -------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_points(poly_geojson, location = "centroid") at test-points.R:48:2 2. \-rmapshaper:::ms_points.json(poly_geojson, location = "centroid") 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-points.R:64:3'): ms_points works with location=inner ----------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_points(poly_geojson, location = "inner") at test-points.R:64:2 2. \-rmapshaper:::ms_points.json(poly_geojson, location = "inner") 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-points.R:85:3'): ms_points works with x and y ------------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_points(poly_geojson, x = "x", y = "y") at test-points.R:85:2 2. \-rmapshaper:::ms_points.json(poly_geojson, x = "x", y = "y") 3. \-rmapshaper::apply_mapshaper_commands(...) 4. \-rmapshaper:::ms_make_ctx() 5. \-ctx$source(...) 6. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 7. +-V8:::get_str_output(...) 8. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:44:3'): ms_simplify.geojson and character works with defaults -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(poly_simp) at test-simplify.R:44:2 2. \-rmapshaper:::ms_simplify.json(poly_simp) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:57:3'): ms_simplify.geojson works with different methods -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(poly_simp, method = "vis", weighting = 0) at test-simplify.R:57:2 2. \-rmapshaper:::ms_simplify.json(poly_simp, method = "vis", weighting = 0) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:67:3'): ms_simplify.SpatialPolygons works with defaults -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(poly_simp_spdf) at test-simplify.R:67:2 2. \-rmapshaper:::ms_simplify.SpatialPolygons(poly_simp_spdf) 3. \-rmapshaper:::ms_sp(input, call, ...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:81:3'): simplify.SpatialPolygonsDataFrame works with other methods -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(poly_simp_spdf, method = "vis", weighting = 0) at test-simplify.R:81:2 2. \-rmapshaper:::ms_simplify.SpatialPolygons(...) 3. \-rmapshaper:::ms_sp(input, call, ...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:100:3'): exploding works with geojson --------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(multipoly, keep_shapes = TRUE, explode = FALSE) at test-simplify.R:100:2 2. \-rmapshaper:::ms_simplify.json(...) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:123:3'): ms_simplify works with drop_null_geometries -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(...) at test-simplify.R:123:2 2. \-rmapshaper:::ms_simplify.json(...) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:130:3'): ms_simplify.SpatialPolygonsDataFrame works keep_shapes = FALSE and ignores drop_null_geometries -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(...) at test-simplify.R:130:2 2. \-rmapshaper:::ms_simplify.SpatialPolygons(...) 3. \-rmapshaper:::ms_sp(input, call, ...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:137:3'): ms_simplify works with lines --------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(line_simp, keep = 0.1) at test-simplify.R:137:2 2. \-rmapshaper:::ms_simplify.json(line_simp, keep = 0.1) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:145:3'): ms_simplify works correctly when all geometries are dropped -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_error(...) at test-simplify.R:145:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_simplify(multiple_poly_simp_spdf, keep = 0.001) 8. \-rmapshaper:::ms_simplify.SpatialPolygons(...) 9. \-rmapshaper:::ms_sp(input, call, ...) 10. \-rmapshaper::apply_mapshaper_commands(...) 11. \-rmapshaper:::ms_make_ctx() 12. \-ctx$source(...) 13. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 14. +-V8:::get_str_output(...) 15. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:163:3'): snap_interval works ------------------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(poly, keep = 0.8, snap = TRUE, snap_interval = 0.09) at test-simplify.R:163:2 2. \-rmapshaper:::ms_simplify.json(...) 3. \-rmapshaper:::ms_simplify_json(...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:171:3'): ms_simplify works with very small values of 'keep -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-simplify.R:171:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_simplify(poly_simp, keep = 1e-04) 5. \-rmapshaper:::ms_simplify.json(poly_simp, keep = 1e-04) 6. \-rmapshaper:::ms_simplify_json(...) 7. \-rmapshaper::apply_mapshaper_commands(...) 8. \-rmapshaper:::ms_make_ctx() 9. \-ctx$source(...) 10. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 11. +-V8:::get_str_output(...) 12. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:179:3'): ms_simplify works with sf ------------------ Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(...) at test-simplify.R:179:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_simplify(multiple_poly_simp_sf) 5. \-rmapshaper:::ms_simplify.sf(multiple_poly_simp_sf) 6. \-rmapshaper:::ms_sf(input, call, ...) 7. \-rmapshaper::apply_mapshaper_commands(...) 8. \-rmapshaper:::ms_make_ctx() 9. \-ctx$source(...) 10. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 11. +-V8:::get_str_output(...) 12. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:191:3'): ms_simplify works with sfc ----------------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_s3_class(ms_simplify(poly_sfc), "sfc_POLYGON") at test-simplify.R:191:2 2. | \-testthat::quasi_label(enquo(object), arg = "object") 3. | \-rlang::eval_bare(expr, quo_get_env(quo)) 4. +-rmapshaper::ms_simplify(poly_sfc) 5. \-rmapshaper:::ms_simplify.sfc(poly_sfc) 6. \-rmapshaper:::ms_sf(input, call, ...) 7. \-rmapshaper::apply_mapshaper_commands(...) 8. \-rmapshaper:::ms_make_ctx() 9. \-ctx$source(...) 10. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 11. +-V8:::get_str_output(...) 12. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:215:5'): ms_simplify works with various column types -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-rmapshaper::ms_simplify(xsf) at test-simplify.R:215:4 2. \-rmapshaper:::ms_simplify.sf(xsf) 3. \-rmapshaper:::ms_sf(input, call, ...) 4. \-rmapshaper::apply_mapshaper_commands(...) 5. \-rmapshaper:::ms_make_ctx() 6. \-ctx$source(...) 7. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 8. +-V8:::get_str_output(...) 9. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-simplify.R:231:3'): ms_simplify works with sf objects containing units -- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_warning(...) at test-simplify.R:231:2 2. | \-testthat:::expect_condition_matching(...) 3. | \-testthat:::quasi_capture(...) 4. | +-testthat (local) .capture(...) 5. | | \-base::withCallingHandlers(...) 6. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 7. +-rmapshaper::ms_simplify(multiple_poly_simp_sf) 8. \-rmapshaper:::ms_simplify.sf(multiple_poly_simp_sf) 9. \-rmapshaper:::ms_sf(input, call, ...) 10. \-rmapshaper::apply_mapshaper_commands(...) 11. \-rmapshaper:::ms_make_ctx() 12. \-ctx$source(...) 13. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 14. +-V8:::get_str_output(...) 15. \-V8:::context_eval(join(src), private$context, serialize, await) -- Error ('test-utils.R:85:3'): an sf data frame with no columns works --------- Error: SyntaxError: Unexpected token . Backtrace: x 1. +-testthat::expect_silent(ms_sf(points, "-info")) at test-utils.R:85:2 2. | \-testthat:::quasi_capture(enquo(object), NULL, evaluate_promise) 3. | +-testthat (local) .capture(...) 4. | | +-withr::with_output_sink(...) 5. | | | \-base::force(code) 6. | | +-base::withCallingHandlers(...) 7. | | \-base::withVisible(code) 8. | \-rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo)) 9. \-rmapshaper:::ms_sf(points, "-info") 10. \-rmapshaper::apply_mapshaper_commands(...) 11. \-rmapshaper:::ms_make_ctx() 12. \-ctx$source(...) 13. \-V8 (local) evaluate_js(readLines(file, encoding = "UTF-8", warn = FALSE)) 14. +-V8:::get_str_output(...) 15. \-V8:::context_eval(join(src), private$context, serialize, await) [ FAIL 52 | WARN 0 | SKIP 17 | PASS 53 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [4s] WARNING Error(s) in re-building vignettes: --- re-building 'rmapshaper.Rmd' using rmarkdown Initiating curl with CURL_SSL_BACKEND: openssl Quitting from lines 54-56 (rmapshaper.Rmd) Error: processing vignette 'rmapshaper.Rmd' failed with diagnostics: SyntaxError: Unexpected token . --- failed re-building 'rmapshaper.Rmd' SUMMARY: processing the following file failed: 'rmapshaper.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 1 WARNING, 1 NOTE