* using log directory 'd:/Rcompile/CRANpkg/local/4.6/senseweight.Rcheck' * using R Under development (unstable) (2025-12-23 r89222 ucrt) * using platform: x86_64-w64-mingw32 * R was compiled by gcc.exe (GCC) 14.3.0 GNU Fortran (GCC) 14.3.0 * running under: Windows Server 2022 x64 (build 20348) * using session charset: UTF-8 * checking for file 'senseweight/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'senseweight' version '0.0.1' * 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 'senseweight' 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 code files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... [1s] OK * checking whether the package can be loaded with stated dependencies ... [1s] OK * checking whether the package can be unloaded cleanly ... [1s] OK * checking whether the namespace can be loaded with stated dependencies ... [1s] OK * checking whether the namespace can be unloaded cleanly ... [1s] OK * checking loading without being on the library search path ... [1s] 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 ... [3s] OK * 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 contents of 'data' directory ... OK * checking data for non-ASCII characters ... [0s] OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... [7s] ERROR Running examples in 'senseweight-Ex.R' failed The error most likely occurred in: > ### Name: contour_plot > ### Title: Bias Contour Plots > ### Aliases: contour_plot > > ### ** Examples > > # For the external validity setting: > data(jtpa_women) > site_name <- "NE" > df_site <- jtpa_women[which(jtpa_women$site == site_name), ] > df_else <- jtpa_women[which(jtpa_women$site != site_name), ] > > # Estimate unweighted estimator: > model_dim <- estimatr::lm_robust(Y ~ T, data = df_site) > PATE <- coef(lm(Y ~ T, data = df_else))[2] > DiM <- coef(model_dim)[2] > # Generate weights using observed covariates: > df_all <- jtpa_women > df_all$S <- ifelse(jtpa_women$site == "NE", 1, 0) > model_ps <- WeightIt::weightit( + (1 - S) ~ . - site - T - Y, + data = df_all, method = "ebal", estimand = "ATT" + ) > weights <- model_ps$weights[df_all$S == 1] > # Estimate IPW model: > model_ipw <- estimatr::lm_robust(Y ~ T, data = df_site, weights = weights) > ipw <- coef(model_ipw)[2] > # Estimate bound for var(tau): > vartau <- var(df_site$Y[df_site$T == 1]) - var(df_site$Y[df_site$T == 0]) > RV <- robustness_value(estimate = ipw, b_star = 0, sigma2 = vartau, weights = weights) > > # Select weighting variables: > weighting_vars <- names(df_all)[which(!names(df_all) %in% c("site", "S", "Y", "T"))] > > # Run benchmarking: > df_benchmark <- run_benchmarking( + weighting_vars = weighting_vars, + data = df_all[, -1], + treatment = "T", outcome = "Y", selection = "S", + estimate = ipw, + RV = RV, sigma2 = vartau, + estimand = "PATE" + ) > # Generate bias contour plot: > contour_plot( + var(weights), vartau, ipw, df_benchmark, + benchmark = TRUE, shade = TRUE, + shade_var = c("age", "prevearn"), + label_size = 4 + ) Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0. ℹ Please use `linewidth` instead. ℹ The deprecated feature was likely used in the senseweight package. Please report the issue to the authors. Error in `metR::geom_text_contour()`: ! Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT Backtrace: ▆ 1. ├─base (local) ``(x) 2. ├─ggplot2 (local) `print.ggplot2::ggplot`(x) 3. │ ├─ggplot2::ggplot_gtable(data) 4. │ └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 5. │ └─ggplot2:::by_layer(...) 6. │ ├─rlang::try_fetch(...) 7. │ │ ├─base::tryCatch(...) 8. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 9. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 10. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 11. │ │ └─base::withCallingHandlers(...) 12. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 13. │ └─l$draw_geom(d, layout) 14. │ └─ggplot2 (local) draw_geom(..., self = self) 15. │ └─self$geom$draw_layer(...) 16. │ └─ggplot2 (local) draw_layer(..., self = self) 17. │ └─base::lapply(...) 18. │ └─ggplot2 (local) FUN(X[[i]], ...) 19. │ ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 20. │ └─self$draw_panel(...) 21. │ └─metR (local) draw_panel(...) 22. │ ├─data[, `:=`(N, .N), by = .(group, piece)] 23. │ └─data.table:::`[.data.table`(...) 24. └─base::.handleSimpleError(...) 25. └─rlang (local) h(simpleError(msg, call)) 26. └─handlers[[1L]](cnd) 27. └─cli::cli_abort(...) 28. └─rlang::abort(...) Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes ... OK * checking re-building of vignette outputs ... [13s] ERROR Error(s) in re-building vignettes: --- re-building 'external-validity.Rmd' using rmarkdown Quitting from external-validity.Rmd:115-122 [contour_plot] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `metR::geom_text_contour()`: ! Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT --- Backtrace: ▆ 1. ├─base::withVisible(knit_print(x, ...)) 2. ├─knitr::knit_print(x, ...) 3. └─knitr:::knit_print.default(x, ...) 4. └─knitr::normal_print(x) 5. ├─base::print(x) 6. └─ggplot2 (local) `print.ggplot2::ggplot`(x) 7. ├─ggplot2::ggplot_gtable(data) 8. └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. └─ggplot2:::by_layer(...) 10. ├─rlang::try_fetch(...) 11. │ ├─base::tryCatch(...) 12. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ └─base::withCallingHandlers(...) 16. └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. └─l$draw_geom(d, layout) 18. └─ggplot2 (local) draw_geom(..., self = self) 19. └─self$geom$draw_layer(...) 20. └─ggplot2 (local) draw_layer(..., self = self) 21. └─base::lapply(...) 22. └─ggplot2 (local) FUN(X[[i]], ...) 23. ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. └─self$draw_panel(...) 25. └─metR (local) draw_panel(...) 26. ├─data[, `:=`(N, .N), by = .(group, piece)] 27. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'external-validity.Rmd' failed with diagnostics: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT --- failed re-building 'external-validity.Rmd' --- re-building 'survey.Rmd' using rmarkdown Quitting from survey.Rmd:158-165 [unnamed-chunk-12] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error in `metR::geom_text_contour()`: ! Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT --- Backtrace: ▆ 1. ├─base::withVisible(knit_print(x, ...)) 2. ├─knitr::knit_print(x, ...) 3. └─knitr:::knit_print.default(x, ...) 4. └─knitr::normal_print(x) 5. ├─base::print(x) 6. └─ggplot2 (local) `print.ggplot2::ggplot`(x) 7. ├─ggplot2::ggplot_gtable(data) 8. └─ggplot2 (local) `ggplot_gtable.ggplot2::ggplot_built`(data) 9. └─ggplot2:::by_layer(...) 10. ├─rlang::try_fetch(...) 11. │ ├─base::tryCatch(...) 12. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) 13. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) 14. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) 15. │ └─base::withCallingHandlers(...) 16. └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) 17. └─l$draw_geom(d, layout) 18. └─ggplot2 (local) draw_geom(..., self = self) 19. └─self$geom$draw_layer(...) 20. └─ggplot2 (local) draw_layer(..., self = self) 21. └─base::lapply(...) 22. └─ggplot2 (local) FUN(X[[i]], ...) 23. ├─rlang::inject(self$draw_panel(data, panel_params, coord, !!!params)) 24. └─self$draw_panel(...) 25. └─metR (local) draw_panel(...) 26. ├─data[, `:=`(N, .N), by = .(group, piece)] 27. └─data.table:::`[.data.table`(...) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Error: processing vignette 'survey.Rmd' failed with diagnostics: Problem while converting geom to grob. ℹ Error occurred in the 2nd layer. Caused by error in `[.data.table`: ! attempt access index 18/18 in VECTOR_ELT --- failed re-building 'survey.Rmd' SUMMARY: processing the following files failed: 'external-validity.Rmd' 'survey.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... [20s] OK * checking HTML version of manual ... [3s] OK * DONE Status: 2 ERRORs