When I run devtools::build_vignettes() I get:
> devtools::build_vignettes()
Building OwenQ vignettes
Your system is ready to build packages!
And then R is freezed. Nothing happens, even after 15 minutes. No folder doc or inst/doc is created.
EDIT
I also tried the following with R 3.6.1:
> devtools::install(build_vignettes = TRUE)
Then I get
Your system is ready to build packages!
√ checking for file 'C:\MyPackages\OwenQ/DESCRIPTION' ...
- preparing 'OwenQ': (8.4s)
√ checking DESCRIPTION meta-information ...
- cleaning src
- installing the package to build vignettes (543ms)
creating vignettes ...
And same result: nothing else happens.
EDIT
Finally, devtools::install(build_vignettes = TRUE) has correctly created the vignettes! But there's no folder inst/doc in the package source folder, the vignettes only are in the package installed folder.
> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
Matrix products: default
locale:
[1] LC_COLLATE=French_Belgium.1252 LC_CTYPE=French_Belgium.1252
[3] LC_MONETARY=French_Belgium.1252 LC_NUMERIC=C
[5] LC_TIME=French_Belgium.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] OwenQ_1.0.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 rstudioapi_0.10 knitr_1.22 magrittr_1.5
[5] usethis_1.5.1 devtools_2.1.0 pkgload_1.0.2 R6_2.4.0
[9] rlang_0.4.0 tools_3.5.3 pkgbuild_1.0.4 xfun_0.7
[13] sessioninfo_1.1.1 cli_1.1.0 withr_2.1.2 remotes_2.1.0
[17] yaml_2.2.0 assertthat_0.2.1 digest_0.6.20 rprojroot_1.3-2
[21] crayon_1.3.4 processx_3.4.1 callr_3.3.1 fs_1.3.1
[25] ps_1.3.0 testthat_2.2.1 glue_1.3.1 memoise_1.1.0
[29] compiler_3.5.3 desc_1.2.0 backports_1.1.4 prettyunits_1.0.2
Related
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:
I've successfully installed Lime (and glmnet) in R but when I try loading it i receive an error:
> require(lime)
Loading required package: lime
Error: package or namespace load failed for ‘lime’:
object ‘coef.cv.glmnet’ is not exported by 'namespace:glmnet'
Searched online and can't seem to find a solution for this.
This is my sessioninfo()
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)
Matrix products: default
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] glmnet_3.0 Matrix_1.2-17
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 rstudioapi_0.10 magrittr_1.5 tidyselect_0.2.5 munsell_0.5.0 colorspace_1.4-1 lattice_0.20-38 R6_2.4.0 rlang_0.4.1
[10] foreach_1.4.7 dplyr_0.8.3 tools_3.6.1 grid_3.6.1 gtable_0.3.0 iterators_1.0.12 lazyeval_0.2.2 assertthat_0.2.1 tibble_2.1.3
[19] crayon_1.3.4 purrr_0.3.3 ggplot2_3.2.1 codetools_0.2-16 shape_1.4.4 glue_1.3.1 compiler_3.6.1 pillar_1.4.2 scales_1.0.0
[28] pkgconfig_2.0.3
I've updated all my packages.
glmnet loads successfully
> library(glmnet)
Loaded glmnet 3.0
The recent major update of glmnet (which now does not export coef.cv.glmnet anymore) appears to have broken lime. You can see errors with the same cause in the CRAN tests. You can expect a fix by the package maintainer soon (or the package will be archived by CRAN). See also this bug report and the answer by the maintainer:
This is due to a recent breaking change in glmnet—lime will be updated soon to fix this
When I open my R Studio blogdown project and serve_site() it previews in the viewer and seems fine except that the content is not updated as it is in .Rmd files. It seems as though the preview site is getting stuck on the old .html files.
When saving an edited blogdown post in R Studio after executing serve_site() I expect the live preview to update.
Right now however, if I make a small edit to a post and click save, the preview fails and I get the following error that I can't make sense of or fix:
Error in generator$render(input_file = input_file, output_format = output_format, :
You probably should not knit the document in a blogdown project. Just call blogdown::serve_site() once per R session. See https://bookdown.org/yihui/blogdown/workflow.html. If you are sure you want to knit it and know what it means, set options(blogdown.allow_knit = TRUE).
Calls: <Anonymous> -> <Anonymous>
Execution halted
sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS 10.14.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/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] shiny_1.2.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 compiler_3.4.3 later_0.8.0 prettyunits_1.0.2 remotes_2.0.2
[6] tools_3.4.3 testthat_2.0.1 digest_0.6.18 pkgbuild_1.0.2 pkgload_1.0.2
[11] jsonlite_1.6 evaluate_0.13 memoise_1.1.0 rlang_0.3.1 rstudioapi_0.9.0
[16] cli_1.0.1 curl_3.3 yaml_2.2.0 blogdown_0.10.5 xfun_0.4
[21] stringr_1.4.0 withr_2.1.2 knitr_1.21 desc_1.2.0 fs_1.2.6
[26] devtools_2.0.1 rprojroot_1.3-2 glue_1.3.0 R6_2.4.0 processx_3.2.1
[31] rmarkdown_1.11 bookdown_0.9 sessioninfo_1.1.1 servr_0.12 callr_3.1.1
[36] magrittr_1.5 backports_1.1.2 ps_1.3.0 promises_1.0.1 htmltools_0.3.6
[41] usethis_1.4.0 rsconnect_0.8.13 assertthat_0.2.0 xtable_1.8-3 mime_0.6
[46] httpuv_1.4.5.1 stringi_1.3.1 miniUI_0.1.1.1 crayon_1.3.4
I have a vignette that I can build using devtools::build_vignettes() but when I try to build the source package (RStudio/Build/build source package) it fails when executing devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette')) with the following error message:
R(32119,0x7fff7437f000) malloc: *** error for object 0x7fff74dc0c30: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Exited with status 6.
This package uses Rcpp but I am definitely not an expert in Cpp and don't understand at all what is going on. I can use the package locally with no troubles.
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: OS X El Capitan 10.11.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/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] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.0 rstudioapi_0.8 knitr_1.20 magrittr_1.5 usethis_1.4.0 devtools_2.0.1
[7] pkgload_1.0.2 R6_2.3.0 rlang_0.3.0.1 tools_3.5.1 pkgbuild_1.0.2 sessioninfo_1.1.1
[13] cli_1.0.1 withr_2.1.2 htmltools_0.3.6 remotes_2.0.2 yaml_2.2.0 assertthat_0.2.0
[19] digest_0.6.18 rprojroot_1.3-2 crayon_1.3.4 processx_3.2.0 callr_3.0.0 clisymbols_1.2.0
[25] base64enc_0.1-3 fs_1.2.6 ps_1.2.1 evaluate_0.12 glue_1.3.0 memoise_1.1.0
[31] rmarkdown_1.10 compiler_3.5.1 desc_1.2.0 backports_1.1.2 prettyunits_1.0.2
I'm trying to read data in the XPT format into R (the format can be found for example in the NHANES data). I found two functions doing this:
library("Hmisc")
sasxport.get("C:/path/file.XPT")
and
library("SASxport")
read.xport("C:/path/file.XPT")
The sasxport.get works, so I'm basically fine, but still inquisitive enough to understand (and solve) the following error: after the installation of the SASxport package, I cannot load it. When I run library("SASxport"), I get the error message:
Error: package or namespace load failed for ‘SASxport’:
object ‘label<-.data.frame’ is not exported by 'namespace:Hmisc'
Adopting this suggestion, I also ran
remove.packages(c("SASxport", "Hmisc"))
install.packages('Hmisc', dependencies = TRUE)
install.packages('SASxport', dependencies = TRUE)
what did not change the error message.
This is my sessionInfo():
R version 3.4.3 (2017-11-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] Hmisc_4.1-1 ggplot2_2.2.1 Formula_1.2-2 survival_2.41-3 lattice_0.20-35
loaded via a namespace (and not attached):
[1] Rcpp_0.12.14 pillar_1.0.1 compiler_3.4.3 RColorBrewer_1.1-2 plyr_1.8.4
[6] base64enc_0.1-3 iterators_1.0.9 tools_3.4.3 rpart_4.1-11 digest_0.6.13
[11] tibble_1.4.1 gtable_0.2.0 htmlTable_1.11.1 checkmate_1.8.5 rlang_0.1.6
[16] icenReg_2.0.7 Matrix_1.2-12 foreach_1.4.4 rstudioapi_0.7 yaml_2.1.16
[21] gridExtra_2.3 coda_0.19-1 stringr_1.2.0 cluster_2.0.6 knitr_1.18
[26] htmlwidgets_0.9 grid_3.4.3 nnet_7.3-12 data.table_1.10.4-3 foreign_0.8-69
[31] latticeExtra_0.6-28 magrittr_1.5 scales_0.5.0 backports_1.1.2 codetools_0.2-15
[36] htmltools_0.3.6 splines_3.4.3 colorspace_1.3-2 stringi_1.1.6 acepack_1.4.1
[41] lazyeval_0.2.1 munsell_0.4.3
The last update of SASxport happend nearly two years ago (2016-03-11). So the Hmisc package it imports might have changed in the meantime. Looking up the Hmisc archive I found the version number on 2016-03-11 to be 3.17-2. So installing this version fixes the problem:
library("devtools")
install_version("Hmisc", version = "3.17-2")
Two reasons speak against using SASxport in this case:
You need to use a old version of a package which might happer your work in later steps.
SASxport needs Hmisc for a task that Hmisc can do already by itself, so SASxport is expendable when reading in XPT files.