blogdown: 'system3' is not an exported object from 'namespace:xfun' - r

On Windows 10, I am getting the following error with blogdown::new_site() function:
Hugo has been installed to "C:\Users\hp\AppData\Roaming\Hugo\0.89.4".
You are recommended to set options(blogdown.hugo.version = "0.89.4")
in the .Rprofile file in your website project. See the blogdown book
for more info on .Rprofile:
https://bookdown.org/yihui/blogdown/global-options.html
Error: 'system3' is not an exported object from 'namespace:xfun'
I'm wondering what am I missing here? Any hints.
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] xfun_0.28
loaded via a namespace (and not attached):
[1] compiler_4.1.2 tools_4.1.2 blogdown_1.6.5 pacman_0.5.1

I don't know how you managed to install the dev version of blogdown without installing the dev version of xfun at the same time, since the latter is required (as specified in DESCRIPTION). Per installation instruction in README, this is how you install the dev version of blogdown:
remotes::install_github('rstudio/blogdown')
And the dev version of xfun should be installed automatically (note that you will need RTools).

FYI I get the exact same error trying to following the TL;DR section of this blog and that is after explicitly updating the xfun package. Here is the entire code segment I am trying to run:
remotes::install_github("rstudio/blogdown")
usethis::create_project()
blogdown::new_site(theme = "wowchemy/starter-academic")
and here is the error I am getting:
09:14:26 > blogdown::new_site(theme = "wowchemy/starter-academic")
― Creating your new site
| Installing Hugo
The latest Hugo version is v0.90.1
trying URL 'https://github.com/gohugoio/hugo/releases/download/v0.90.1/hugo_extended_0.90.1_macOS-ARM64.tar.gz'
Content type 'application/octet-stream' length 16102460 bytes (15.4 MB)
==================================================
downloaded 15.4 MB
Hugo has been installed to "/Users/rogerbos/Library/Application Support/Hugo/0.90.1".
Error: 'system3' is not an exported object from 'namespace:xfun'
09:14:26 >
and here is my sessionInfo():
9:14:26 > sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Monterey 12.0.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] datasets utils stats graphics grDevices methods base
other attached packages:
[1] alphavantager_0.1.2 googlesheets4_1.0.0 googledrive_2.0.0
[4] clipr_0.7.1 jsonlite_1.7.2 stringi_1.7.6
[7] dtplyr_1.1.0 data.table_1.14.2 dplyr_1.0.7
[10] plyr_1.8.6 testthat_3.1.0 lubridate_1.8.0
[13] timeDate_3043.102 sendmailR_1.2-1 rmarkdown_2.11
[16] devtools_2.4.2 usethis_2.1.3 xts_0.12.1
[19] zoo_1.8-9 MASS_7.3-54 fortunes_1.5-4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 lattice_0.20-45 prettyunits_1.1.1
[4] ps_1.6.0 assertthat_0.2.1 rprojroot_2.0.2
[7] digest_0.6.29 utf8_1.2.2 R6_2.5.1
[10] cellranger_1.1.0 evaluate_0.14 blogdown_1.6.5
[13] httr_1.4.2 pillar_1.6.4 rlang_0.4.12
[16] curl_4.3.2 rstudioapi_0.13 callr_3.7.0
[19] desc_1.4.0 compiler_4.1.2 xfun_0.28
[22] pkgconfig_2.0.3 askpass_1.1 base64enc_0.1-3
[25] pkgbuild_1.2.0 htmltools_0.5.2 openssl_1.4.5
[28] tidyselect_1.1.1 tibble_3.1.5 bookdown_0.24
[31] fansi_0.5.0 crayon_1.4.2 withr_2.4.2
[34] rappdirs_0.3.3 grid_4.1.2 lifecycle_1.0.1
[37] DBI_1.1.1 magrittr_2.0.1 cli_3.1.0
[40] cachem_1.0.6 fs_1.5.0 remotes_2.4.1
[43] ellipsis_0.3.2 vctrs_0.3.8 generics_0.1.1
[46] tools_4.1.2 glue_1.5.1 purrr_0.3.4
[49] processx_3.5.2 pkgload_1.2.3 fastmap_1.1.0
[52] gargle_1.2.0 sessioninfo_1.2.1 memoise_2.0.0
[55] knitr_1.36

Related

R gt gtsave Error in s$close() : attempt to apply non-function

I use the gt package to create and save a table that I produce. Recently, I have sometimes been getting the following error when I attempt to gtsave.
Error in s$close() : attempt to apply non-function
Here is session information:
> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 later_1.3.0 cellranger_1.1.0 pillar_1.8.1 compiler_4.1.1 tools_4.1.1
[7] digest_0.6.29 jsonlite_1.8.0 googledrive_2.0.0 lifecycle_1.0.2 gargle_1.2.1 tibble_3.1.8
[13] gtable_0.3.1 pkgconfig_2.0.3 rlang_1.0.5 svGUI_1.0.1 cli_3.4.0 rstudioapi_0.14
[19] commonmark_1.8.0 curl_4.3.2 fastmap_1.1.0 webshot2_0.1.0 dplyr_1.0.10 stringr_1.4.1
[25] generics_0.1.3 fs_1.5.2 vctrs_0.4.1 sass_0.4.2 svDialogs_1.1.0 websocket_1.4.1
[31] googlesheets4_1.0.1 grid_4.1.1 tidyselect_1.1.2 chromote_0.1.1 glue_1.6.2 R6_2.5.1
[37] processx_3.7.0 fansi_1.0.3 tidyr_1.2.1 purrr_0.3.4 ggplot2_3.3.6 magrittr_2.0.3
[43] ps_1.7.1 promises_1.2.0.1 scales_1.2.1 htmltools_0.5.3 ellipsis_0.3.2 gt_0.7.0
[49] colorspace_2.0-3 utf8_1.2.2 stringi_1.7.8 munsell_0.5.0
I can install.packages("webshot") again to and then re-run my code usually without issue. However, this isn't a great solution. Anyone have any suggestions? I have managed to recreate this issue on two different, independent computers (and code) after updating my R, Rstudio, and all of my packages.
Thanks!

Loading the package('kableExtra')

I'm a new user to rmarkdown and trying to learn how to format better tables for a report.
I had a report using the package "kableExtra" and it was fine. But now I cannot even load the package anymore and I do not know why.
This is the error I get:
"package of namespace load failed for 'kableExtra' in
library.dynam(lib, package, package.lib): DLL 'systemfonts' not
found: maybe not installed for this architecture? Execution halted"
Anyone can help me, please?
I am using RStudio 2022.02.0 Build 443
and R version 4.1.2 (2021-11-01) -- "Bird Hippie"
Thank you :)
sessionInfo() R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build
19042)
Matrix products: default
locale: [1] LC_COLLATE=English_Canada.1252
LC_CTYPE=English_Canada.1252 LC_MONETARY=English_Canada.1252
LC_NUMERIC=C [5] LC_TIME=English_Canada.1252
attached base packages: [1] stats graphics grDevices utils
datasets methods base
other attached packages: [1] dplyr_1.0.8
loaded via a namespace (and not attached): [1] pillar_1.7.0
compiler_4.1.2 remotes_2.4.2 prettyunits_1.1.1 tools_4.1.2
testthat_3.1.2 digest_0.6.29 [8] pkgbuild_1.3.1
pkgload_1.2.4 evaluate_0.15 memoise_2.0.1 lifecycle_1.0.1
tibble_3.1.6 pkgconfig_2.0.3 [15] rlang_1.0.2 DBI_1.1.2
cli_3.2.0 rstudioapi_0.13 curl_4.3.2 yaml_2.3.5
xfun_0.30 [22] fastmap_1.1.0 withr_2.5.0 knitr_1.38
desc_1.4.1 generics_0.1.2 vctrs_0.3.8 fs_1.5.2
[29] devtools_2.4.3 rprojroot_2.0.2 tidyselect_1.1.2 glue_1.6.2
R6_2.5.1 processx_3.5.2 fansi_1.0.2 [36]
rmarkdown_2.13 sessioninfo_1.2.2 purrr_0.3.4 callr_3.7.0
magrittr_2.0.2 usethis_2.1.5 ps_1.6.0 [43]
ellipsis_0.3.2 htmltools_0.5.2 assertthat_0.2.1 utf8_1.2.2
cachem_1.0.6 crayon_1.5.1 brio_1.1.3

pkgdown::build_site() not capturing R package logo in HTML renders

I recently got a new laptop with Windows 11 (despite my sessionInfo() stating Windows 10) and I'm trying to build a pkgdown site for an R package that I'm developing. This is not an issue that I have encountered in the past. Running the command pkgdown::build_site() does not correctly link my custom logo to the HTML sites for this R package.
Custom logo png below, for posterity:
brConnectR logo
The man/figures/logo.png file was generated with usethis::use_logo("path/to/logo.png") and the favicons were generated as part of the pkgdown::build_site() process, however, the resulting docs/index.html fails to capture any logo. Below is my sessionInfo():
> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] brConnectR_0.0.0.9000 usethis_2.1.3
loaded via a namespace (and not attached):
[1] tidyselect_1.1.1 xfun_0.27 remotes_2.4.1 purrr_0.3.4
[5] rcmdcheck_1.4.0 vctrs_0.3.8 generics_0.1.1 testthat_3.1.0
[9] htmltools_0.5.2 yaml_2.2.1 utf8_1.2.2 blob_1.2.2
[13] rlang_0.4.12 pkgbuild_1.2.0 pkgdown_1.6.1 pillar_1.6.4
[17] glue_1.4.2 withr_2.4.2 DBI_1.1.1 bit64_4.0.5
[21] xopen_1.0.0 dbplyr_2.1.1 sessioninfo_1.1.1 lifecycle_1.0.1
[25] stringr_1.4.0 commonmark_1.7 devtools_2.4.2 memoise_2.0.0
[29] evaluate_0.14 knitr_1.36 callr_3.7.0 fastmap_1.1.0
[33] ps_1.6.0 curl_4.3.2 fansi_0.5.0 Rcpp_1.0.7
[37] clipr_0.7.1 cachem_1.0.6 desc_1.4.0 pkgload_1.2.3
[41] magick_2.7.3 fs_1.5.0 bit_4.0.4 hms_1.1.1
[45] digest_0.6.28 stringi_1.7.5 processx_3.5.2 dplyr_1.0.7
[49] rprojroot_2.0.2 cli_3.0.1 tools_4.1.1 odbc_1.3.2
[53] magrittr_2.0.1 tibble_3.1.5 crayon_1.4.1 pkgconfig_2.0.3
[57] ellipsis_0.3.2 xml2_1.3.2 prettyunits_1.1.1 assertthat_0.2.1
[61] rmarkdown_2.11 roxygen2_7.1.2 rstudioapi_0.13 R6_2.5.1
[65] compiler_4.1.1
Any pointers would be much appreciated!
I resolved this issue following the Package Logo section of the pkgdown::build_home() reference page:
If you have a package logo, you can include it at the top of your
README in a level-one heading:
# pkgdown <img src="man/figures/logo.png" align="right" />
init_site() will also automatically create a favicon set from your package logo.
In addition to the above, I installed the development version of pkgdown and this fixed a cryptic warning that I was getting when running pkgdown::build_site() ("WARNING Deprecated: markdown_github. Use gfm").
To install the dev version from GitHub: devtools::install_github("r-lib/pkgdown")

Sparklyr - fail to connect to "local"

When trying to connect to spark using sparklyr, I get the following error message:
'Error in spark_connect_gateway(gatewayAddress, gatewayPort, sessionId, :
Gateway in localhost:8880 did not respond.'
There is no other info displayed in Console. I'm running Spark 3.0.0 and Java 8 RE.
I went looking for the .log file and found it. This is what it contained:
'Cool' is not recognized as an internal or external command,
operable program or batch file.
Failed to find Spark jars directory.
You need to build Spark before running this program.
My local account name contains 'Cool' with spaces in the name, so it may have to do with the file path I set in PATH for spark_home. How can I include spaces in the file path? I've tried different combinations of quotation marks, but still get the same error message.
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] dplyr_1.0.2 sparklyr_1.4.0 shiny_1.5.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 later_1.1.0.1 compiler_4.0.2 pillar_1.4.6 dbplyr_1.4.4 r2d3_0.2.3
[7] base64enc_0.1-3 tools_4.0.2 odbc_1.2.3 digest_0.6.25 bit_4.0.4 jsonlite_1.7.1
[13] evaluate_0.14 tibble_3.0.3 lifecycle_0.2.0 pkgconfig_2.0.3 rlang_0.4.7 DBI_1.1.0
[19] rstudioapi_0.11 parallel_4.0.2 yaml_2.2.1 xfun_0.17 fastmap_1.0.1 withr_2.3.0
[25] httr_1.4.2 knitr_1.30 askpass_1.1 rappdirs_0.3.1 generics_0.0.2 vctrs_0.3.4
[31] htmlwidgets_1.5.1 hms_0.5.3 bit64_4.0.5 rprojroot_1.3-2 tidyselect_1.1.0 glue_1.4.2
[37] forge_0.2.0 R6_2.4.1 rmarkdown_2.3 tidyr_1.1.2 purrr_0.3.4 blob_1.2.1
[43] magrittr_1.5 promises_1.1.1 backports_1.1.10 htmltools_0.5.0 ellipsis_0.3.1 assertthat_0.2.1
[49] xtable_1.8-4 mime_0.9 httpuv_1.5.4 config_0.3 tinytex_0.26 openssl_1.4.3

R unable to find repository for package RODBC when deploying

When I deploy to shinyapps.io, it gives me an error:
Unable to find repository URL for package RODBC
So when I go to open the chart via URL, it doesn't show anything, because it was unable to connect to the connection I had and load the data into the data frames I had created.
Deploy information:
The package is installed and works normally, even I search the data in my database through it.
After I posted the question in the R (R Community Question) community, I ended up following the steps as directed by #nirgrahamuk, and the error no longer appears!
So I had to update the R version to the latest one, and it worked!
After having executed the commands in R he asked:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.1 rsconnect_0.8.16 tools_3.6.1 curl_4.3 jsonlite_1.6.1
[6] digest_0.6.25 openssl_1.4.1 askpass_1.1
After updating the R version:
> getOption("repos")
CRAN
"https://cran.rstudio.com/"
attr(,"RStudio")
[1] TRUE
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reshape2_1.4.4 lubridate_1.7.9 dplyr_1.0.0 DBI_1.1.0 RODBC_1.3-17 timevis_0.5
[7] shiny_1.5.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 compiler_4.0.2 pillar_1.4.4 later_1.1.0.1 plyr_1.8.6
[6] tools_4.0.2 digest_0.6.25 evaluate_0.14 jsonlite_1.6.1 lifecycle_0.2.0
[11] tibble_3.0.1 pkgconfig_2.0.3 rlang_0.4.6 cli_2.0.2 rstudioapi_0.11
[16] yaml_2.2.1 curl_4.3 xfun_0.15 fastmap_1.0.1 withr_2.2.0
[21] knitr_1.29 stringr_1.4.0 htmlwidgets_1.5.1 generics_0.0.2 vctrs_0.3.1
[26] askpass_1.1 tidyselect_1.1.0 glue_1.4.1 R6_2.4.1 fansi_0.4.1
[31] rmarkdown_2.3 purrr_0.3.4 magrittr_1.5 promises_1.1.1 htmltools_0.5.0
[36] ellipsis_0.3.1 assertthat_0.2.1 rsconnect_0.8.16 mime_0.9 xtable_1.8-4
[41] httpuv_1.5.4 stringi_1.4.6 openssl_1.4.1 crayon_1.3.4
So the version has been updated from R version 3.6.1 (2019-7-05) to R version 4.0.2 (2020-06-22).
And the error no longer appears:

Resources