* using log directory 'd:/Rcompile/CRANpkg/local/3.4/grainchanger.Rcheck' * using R version 3.4.4 (2018-03-15) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'grainchanger/DESCRIPTION' ... OK * this is package 'grainchanger' version '0.1.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 'grainchanger' 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 ... [2s] 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 R/sysdata.rda ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ERROR Running examples in 'grainchanger-Ex.R' failed The error most likely occurred in: > ### Name: nomove_agg > ### Title: Direct data aggregation > ### Aliases: nomove_agg > ### Keywords: aggregate spatial, > > ### ** Examples > > # load required data > data(g_sf) > data(cont_ls) > data(cat_ls) > > # aggregate using mean > d = nomove_agg(g_sf, cont_ls, "mean") Error in methods::validObject(y) : invalid class "Extent" object: TRUE Calls: nomove_agg ... values.list -> value -> value.Future -> resignalConditions Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [6s] ERROR Running 'testthat.R' [6s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(grainchanger) > > test_check("grainchanger") -- 1. Error: shei calculation is correct (@test-nomove_agg.R#4) --------------- invalid class "Extent" object: TRUE 1: nomove_agg(g_sf, cat_ls, "shei", lc_class = 0:3) at testthat/test-nomove_agg.R:4 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, fun, ...) { grid_cell <- sf::st_geometry(grid_cell) grid_cell_sf <- sf::st_sf(grid_cell) dat_cell <- raster::crop(dat, grid_cell_sf) value <- get(fun)(as.vector(dat_cell), ...) }, dat, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 2. Error: mean calculation is correct (@test-nomove_agg.R#9) --------------- invalid class "Extent" object: TRUE 1: nomove_agg(g_sf, cont_ls, "mean") at testthat/test-nomove_agg.R:9 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, fun, ...) { grid_cell <- sf::st_geometry(grid_cell) grid_cell_sf <- sf::st_sf(grid_cell) dat_cell <- raster::crop(dat, grid_cell_sf) value <- get(fun)(as.vector(dat_cell), ...) }, dat, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 3. Error: output is vector of length of grid for sf input (@test-nomove_agg.R invalid class "Extent" object: TRUE 1: nomove_agg(g_sf, cont_ls, "mean") at testthat/test-nomove_agg.R:15 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, fun, ...) { grid_cell <- sf::st_geometry(grid_cell) grid_cell_sf <- sf::st_sf(grid_cell) dat_cell <- raster::crop(dat, grid_cell_sf) value <- get(fun)(as.vector(dat_cell), ...) }, dat, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 4. Error: winmove_agg can take different grid inputs (@test-nomove_agg.R#28) invalid class "Extent" object: TRUE 1: expect_is(nomove_agg(g_sf, cont_ls, "mean"), "numeric") at testthat/test-nomove_agg.R:28 2: quasi_label(enquo(object), label, arg = "object") 3: eval_bare(get_expr(quo), get_env(quo)) 4: nomove_agg(g_sf, cont_ls, "mean") 5: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, fun, ...) { grid_cell <- sf::st_geometry(grid_cell) grid_cell_sf <- sf::st_sf(grid_cell) dat_cell <- raster::crop(dat, grid_cell_sf) value <- get(fun)(as.vector(dat_cell), ...) }, dat, fun, ...) 6: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 7: multi_resolve(fs, names(.x)) 8: values(fs) 9: values.list(fs) 10: value(tmp, ...) 11: value.Future(tmp, ...) 12: resignalConditions(future) -- 5. Error: shei calculation is correct (@test-winmove_agg.R#4) -------------- invalid class "Extent" object: TRUE 1: winmove_agg(g_sf, cat_ls, 5, "rectangle", "shei", lc_class = 0:3) at testthat/test-winmove_agg.R:4 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, d, type, fun, ...) { grid_buffer <- sf::st_buffer(grid_cell, dist = d, endCapStyle = "SQUARE", joinStyle = "MITRE", mitreLimit = d/2) grid_buffer <- sf::st_geometry(grid_buffer) grid_buffer <- sf::st_sf(grid_buffer) dat_cell <- raster::crop(dat, grid_buffer) winmove_cellr <- winmove(dat_cell, d, type, fun, ...) mean(raster::values(winmove_cellr), na.rm = TRUE) }, dat, d, type, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 6. Error: mean calculation is correct (@test-winmove_agg.R#9) -------------- invalid class "Extent" object: TRUE 1: winmove_agg(g_sf, cont_ls, 5, "rectangle", "mean") at testthat/test-winmove_agg.R:9 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, d, type, fun, ...) { grid_buffer <- sf::st_buffer(grid_cell, dist = d, endCapStyle = "SQUARE", joinStyle = "MITRE", mitreLimit = d/2) grid_buffer <- sf::st_geometry(grid_buffer) grid_buffer <- sf::st_sf(grid_buffer) dat_cell <- raster::crop(dat, grid_buffer) winmove_cellr <- winmove(dat_cell, d, type, fun, ...) mean(raster::values(winmove_cellr), na.rm = TRUE) }, dat, d, type, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 7. Error: output is vector of length of input (@test-winmove_agg.R#15) ----- invalid class "Extent" object: TRUE 1: winmove_agg(g_sf, cont_ls, 5, "rectangle", "mean") at testthat/test-winmove_agg.R:15 2: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, d, type, fun, ...) { grid_buffer <- sf::st_buffer(grid_cell, dist = d, endCapStyle = "SQUARE", joinStyle = "MITRE", mitreLimit = d/2) grid_buffer <- sf::st_geometry(grid_buffer) grid_buffer <- sf::st_sf(grid_buffer) dat_cell <- raster::crop(dat, grid_buffer) winmove_cellr <- winmove(dat_cell, d, type, fun, ...) mean(raster::values(winmove_cellr), na.rm = TRUE) }, dat, d, type, fun, ...) 3: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 4: multi_resolve(fs, names(.x)) 5: values(fs) 6: values.list(fs) 7: value(tmp, ...) 8: value.Future(tmp, ...) 9: resignalConditions(future) -- 8. Error: winmove_agg can take different grid inputs (@test-winmove_agg.R#21) invalid class "Extent" object: TRUE 1: expect_is(winmove_agg(g_sf, cont_ls, 5, "rectangle", "mean"), "numeric") at testthat/test-winmove_agg.R:21 2: quasi_label(enquo(object), label, arg = "object") 3: eval_bare(get_expr(quo), get_env(quo)) 4: winmove_agg(g_sf, cont_ls, 5, "rectangle", "mean") 5: furrr::future_map_dbl(sf::st_geometry(g), function(grid_cell, dat, d, type, fun, ...) { grid_buffer <- sf::st_buffer(grid_cell, dist = d, endCapStyle = "SQUARE", joinStyle = "MITRE", mitreLimit = d/2) grid_buffer <- sf::st_geometry(grid_buffer) grid_buffer <- sf::st_sf(grid_buffer) dat_cell <- raster::crop(dat, grid_buffer) winmove_cellr <- winmove(dat_cell, d, type, fun, ...) mean(raster::values(winmove_cellr), na.rm = TRUE) }, dat, d, type, fun, ...) 6: future_map_template(purrr::map_dbl, "double", .x, .f, ..., .progress = .progress, .options = .options) 7: multi_resolve(fs, names(.x)) 8: values(fs) 9: values.list(fs) 10: value(tmp, ...) 11: value.Future(tmp, ...) 12: resignalConditions(future) == testthat results =========================================================== OK: 7 SKIPPED: 0 WARNINGS: 0 FAILED: 8 1. Error: shei calculation is correct (@test-nomove_agg.R#4) 2. Error: mean calculation is correct (@test-nomove_agg.R#9) 3. Error: output is vector of length of grid for sf input (@test-nomove_agg.R#15) 4. Error: winmove_agg can take different grid inputs (@test-nomove_agg.R#28) 5. Error: shei calculation is correct (@test-winmove_agg.R#4) 6. Error: mean calculation is correct (@test-winmove_agg.R#9) 7. Error: output is vector of length of input (@test-winmove_agg.R#15) 8. Error: winmove_agg can take different grid inputs (@test-winmove_agg.R#21) Error: testthat unit tests failed Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [6s] WARNING Error in re-building vignettes: ... Quitting from lines 39-51 (getting-started.Rmd) Error: processing vignette 'getting-started.Rmd' failed with diagnostics: invalid class "Extent" object: TRUE Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 1 WARNING