Loading the package('kableExtra') - r

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

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!

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

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

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")

Loading Magick package after tidyverse [duplicate]

This question already has answers here:
Rcpp package doesn't include Rcpp_precious_remove
(2 answers)
Closed 1 year ago.
I would like to loading the magick package in R, but not sure where the error is coming from. Using R version 4.0.5. I think the issue might with tidyverse package as I installed that after properly loading magick, but now it doesn't work at all. Using Windows and RStudio
library(magick)
Error: package or namespace load failed for ‘magick’:
.onLoad failed in loadNamespace() for 'magick', details:
call: set_magick_tempdir(tempdir())
error: function 'Rcpp_precious_remove' not provided by package 'Rcpp'
It may be better to not load tidyverse as a package. Perhaps, load those individual packages i.e. library(dplyr);library(tidyr) etc as this works without loading the library(tidyverse)
library(magick)
Linking to ImageMagick 6.9.12.3
Enabled features: cairo, fontconfig, freetype, heic, lcms, pango, raw, rsvg, webp
Disabled features: fftw, ghostscript, x11
The output of sessionInfo() is below
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.5.1
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRblas.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] magick_2.7.2 lubridate_1.7.10 janitor_2.1.0 collapse_1.6.2 tibble_3.1.2 purrr_0.3.4 tidyr_1.1.3 dplyr_1.0.7 data.table_1.14.0
[10] overflow_0.2-4 stringr_1.4.0 reshape2_1.4.4
loaded via a namespace (and not attached):
[1] splines_4.1.0 gtools_3.8.2 Formula_1.2-4 latticeExtra_0.6-29 numDeriv_2016.8-1.1 pillar_1.6.1
[7] backports_1.2.1 lattice_0.20-44 glue_1.4.2 RcppEigen_0.3.3.9.1 digest_0.6.27 RColorBrewer_1.1-2
[13] checkmate_2.0.0 snakecase_0.11.0 minqa_1.2.4 colorspace_2.0-1 sandwich_3.0-1 htmltools_0.5.1.1
[19] Matrix_1.3-3 plyr_1.8.6 pkgconfig_2.0.3 broom_0.7.6 weights_1.0.4 scales_1.1.1
[25] gdata_2.18.0 jpeg_0.1-8.1 lme4_1.1-27 htmlTable_2.2.1 generics_0.1.0 ggplot2_3.3.3
[31] ellipsis_0.3.2 nnet_7.3-16 cli_2.5.0 survival_3.2-11 magrittr_2.0.1 crayon_1.4.1
[37] ps_1.6.0 mice_3.13.0 fansi_0.4.2 nlme_3.1-152 MASS_7.3-54 RcppArmadillo_0.10.4.0.0
[43] foreign_0.8-81 dreamerr_1.2.3 fixest_0.9.0 tools_4.1.0 lifecycle_1.0.0 munsell_0.5.0
[49] cluster_2.1.2 compiler_4.1.0 rlang_0.4.11 grid_4.1.0 nloptr_1.2.2.2 rstudioapi_0.13
[55] htmlwidgets_1.5.3 base64enc_0.1-3 boot_1.3-28 gtable_0.3.0 R6_2.5.0 gridExtra_2.3
[61] zoo_1.8-9 knitr_1.33 utf8_1.2.1 Hmisc_4.5-0 stringi_1.6.2 parallel_4.1.0
[67] Rcpp_1.0.6 vctrs_0.3.8 rpart_4.1-15 png_0.1-7 tidyselect_1.1.1 xfun_0.23

connection refused in R

I'm using multiMiR package to for miRNA target retrieval. Till yesterday this package was running fine and now it is showing following error:
library(multiMiR)
Error: package or namespace load failed for ‘multiMiR’:
.onLoad failed in loadNamespace() for 'multiMiR', details:
call: function (type, msg, asError = TRUE)
error: Failed to connect to multimir.org port 80: Connection refused
I tried to reinstall multiMiR package and restart rstudio. but still, it is showing the same error.
I don't understand how to solve this connection problem.
The below link I checked but I don't understand if that's the problem with my query here.
https://askubuntu.com/questions/676434/port-80-connection-refused
Any help will be appreciated.
please find below session info:
> sessionInfo()
R version 4.1.0 (2021-05-18)
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 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
loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 lattice_0.20-44 corpcor_1.6.9 png_0.1-7
[5] Biostrings_2.60.1 snow_0.4-3 assertthat_0.2.1 digest_0.6.27
[9] foreach_1.5.1 utf8_1.2.1 RSpectra_0.16-0 R6_2.5.0
[13] GenomeInfoDb_1.28.1 stats4_4.1.0 RSQLite_2.2.7 httr_1.4.2
[17] ggplot2_3.3.5 pillar_1.6.1 zlibbioc_1.38.0 rlang_0.4.11
[21] rstudioapi_0.13 blob_1.2.1 S4Vectors_0.30.0 Matrix_1.3-4
[25] DT_0.18 reticulate_1.20 Rtsne_0.15 htmlwidgets_1.5.3
[29] RCurl_1.98-1.3 bit_4.0.4 munsell_0.5.0 umap_0.2.7.0
[33] compiler_4.1.0 pkgconfig_2.0.3 askpass_1.1 BiocGenerics_0.38.0
[37] htmltools_0.5.1.1 doSNOW_1.0.19 openssl_1.4.4 tidyselect_1.1.1
[41] KEGGREST_1.32.0 GenomeInfoDbData_1.2.6 tibble_3.1.2 matrixcalc_1.0-4
[45] IRanges_2.26.0 codetools_0.2-18 XML_3.99-0.6 fansi_0.5.0
[49] crayon_1.4.1 dplyr_1.0.7 bitops_1.0-7 grid_4.1.0
[53] jsonlite_1.7.2 gtable_0.3.0 lifecycle_1.0.0 DBI_1.1.1
[57] magrittr_2.0.1 scales_1.1.1 cachem_1.0.5 XVector_0.32.0
[61] doParallel_1.0.16 ellipsis_0.3.2 generics_0.1.0 vctrs_0.3.8
[65] iterators_1.0.13 tools_4.1.0 bit64_4.0.5 Biobase_2.52.0
[69] glue_1.4.2 purrr_0.3.4 M3C_1.14.0 parallel_4.1.0
[73] fastmap_1.1.0 AnnotationDbi_1.54.1 colorspace_2.0-2 BiocManager_1.30.16
[77] cluster_2.1.2 memoise_2.0.0
This seems to be a (hopefully) temporary issue. The error does not seem to be on your side - at the time of writing the site multimir.org is currently down, which is why you are getting an error.
As the package depends on connection to external database, I encourage you to raise an issue on their repository.
EDIT July 20th 2021: The site is now up.

Resources