devtools::build_manual() produces Error: Failed to build manual (at least on windows).
Steps to reproduce:
create a new R project on R Studio.
Add this documentation for the hello_world function, document and build the package.
#' Hello world doc
#'
#' #export
#'
hello <- function() {
print("Hello, world!")
}
Try running devtools::build_manual()
Error: Failed to build manual
This seems to be a recent issue; I could build my packages manuals not too long ago. I tried the check_manual() function in this issue, and this is what I get:
> check_man()
Checking: hello.RdError: Failed to build manual
Called from: value[[3L]](cond)
Browse[1]> e
System command 'Rcmd.exe' failed, exit status: 1, stdout + stderr (last 10 lines):
E> ima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmb8a.pfb><c:/Use
E> rs/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmr8a.pfb><c
E> :/Users/plima/AppData/Roaming/TinyTeX/texmf-dist/fonts/type1/urw/times/utmri8a.
E> pfb>
E> Output written on Rd2.pdf (1 page, 50650 bytes).
E> Transcript written on Rd2.log.
E> Warning in sys2(makeindex, shQuote(idxfile)) : '"makeindex"' not found
E> Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
E> unable to run 'makeindex' on 'Rd2.idx'
E> Error in running tools::texi2pdf()
I don't know what to do with this output. All I know is that I could build manuals not too long ago.
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
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] manualtest_0.1.0
loaded via a namespace (and not attached):
[1] magrittr_2.0.1 usethis_2.0.1 devtools_2.4.2 pkgload_1.2.1 R6_2.5.0 rlang_0.4.11
[7] fastmap_1.1.0 fansi_0.5.0 tools_4.1.0 pkgbuild_1.2.0 sessioninfo_1.1.1 utf8_1.2.2
[13] cli_3.0.1 withr_2.4.2 ellipsis_0.3.2 remotes_2.4.0 rprojroot_2.0.2 tibble_3.1.3
[19] lifecycle_1.0.0 crayon_1.4.1 processx_3.5.2 purrr_0.3.4 callr_3.7.0 vctrs_0.3.8
[25] fs_1.5.0 ps_1.6.0 testthat_3.0.4 memoise_2.0.0 glue_1.4.2 cachem_1.0.5
[31] pillar_1.6.1 compiler_4.1.0 desc_1.3.0 prettyunits_1.1.1 pkgconfig_2.0.3
Running tinytex::tlmgr_install("makeindex") solved the issue, without the need to reinstall tinytex.
Related
My quarto documents have stopped rendering suddenly. I have reinstalled RStudio and the quarto package, but this issue persists.
When I open a new quarto document, I no longer see the boilerplate material in the new document. The document is empty as if I had selected Create Empty Document, but I haven't.
Then, the document renders when all I include is raw text, but when I include an r code chunk, I get the following message.
Error in xfun::normalize_path(path, ..., must_work = must_work, resolve_symlink = FALSE) :
unused argument (resolve_symlink = FALSE)
Calls: .main ... execute -> setwd -> dirname -> <Anonymous> -> normalize_path
Execution halted
Here is the quarto document I'm attempting to render.
---
title: "Testing"
---
```{r}
mtcars |> print()
```
Here is my session info:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.utf8
[2] LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] Rcpp_1.0.9 ps_1.7.2 digest_0.6.30 later_1.3.0
[5] jsonlite_1.8.4 pacman_0.5.1 evaluate_0.20 zip_2.2.2
[9] rlang_1.0.6 cli_3.4.1 rstudioapi_0.14 fs_1.5.2
[13] rmarkdown_2.20 tools_4.2.2 yaml_2.3.6 xfun_0.35
[17] fastmap_1.1.0 parallel_4.2.2 compiler_4.2.2 processx_3.8.0
[21] htmltools_0.5.4 knitr_1.41 quarto_1.2
I was having the exact same issue with knitr, this worked for me:
Remove the package "xfun" from the packages section, then reinstall it immediately after.
I'd tried changing the root install for R and everything. Turns out it was just xfun being weird.
Found the solution on the Posit Community forum.
Do you have any spaces in the filename or file path? That was preventing me from rendering for a bit.
I recently updated to R 4.03 and since doing so I have had difficulty uploading csv files in R studio. This is true whether trying to import with code or when manually importing using the tab Environment -> "Import Dataset." The error message I receive is "Error in if (num_colors < 256) { : missing value where TRUE/FALSE needed."
Here is the code I am using:
library(readr)
df <- read_csv("df.csv")
Error in if (num_colors < 256) { : missing value where TRUE/FALSE needed`
I thought this may have something to do with the package "crayon" but loading this library does not seem to make a difference.
Furthermore, when I save "df.csv" as an excel file "df.xlsx" I am able to load the dataset without issue using the following code
library(readxl)
df <- read_excel(df.xlsx)
I don't encounter this problem when using R 4.0.2 on a different machine, so I suspect this issue may be related to the upgrade.
Any insights are appreciated.
Update:
Newish R user and I appreciate everyone's interest in this question. I believe the session is clean. Per Ben's request:
find("read_csv")
[1] "package:readr"
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 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] dplyr_1.0.3 crayon_1.4.1 readxl_1.3.1 plyr_1.8.6 readr_1.4.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 rstudioapi_0.13 magrittr_2.0.1 hms_1.0.0 tidyselect_1.1.0 lattice_0.20-41 R6_2.5.0 rlang_0.4.10 fansi_0.4.2
[10] tools_4.0.3 grid_4.0.3 utf8_1.1.4 DBI_1.1.1 cli_2.3.0 ellipsis_0.3.1 assertthat_0.2.1 tibble_3.0.5 lifecycle_0.2.0
[19] Matrix_1.2-18 purrr_0.3.4 vctrs_0.3.6 glue_1.4.2 compiler_4.0.3 pillar_1.4.7 cellranger_1.1.0 generics_0.1.0 pkgconfig_2.0.3
I'd suggest updating RStudio to the latest version as well as R.
That did the trick for me.
Edit
In view of Ben's request below.
R version: 4.0.4;
RStudio version: 1.4.1103
thanks for checking out my very first post. please bear with my formatting.
Issue summary: I have been using tdplyr to access teradata database with no issue until I tested another package called dplyr.teradata for potential performance enhancement. However I can no longer connect to the database due to the following error messages:
Error: package or namespace load failed for 'tdplyr':.onLoad failed
in loadNamespace() for 'tdplyr', details:
call: parent.env(from)
error: argument is not an environment
so I deleted the dplyr.teradata package, thought that would allow my original tdplyr to work, but I still get the same error message above. then I deleted the tdplyr package without backup, trying to reinstall using the original script below:
install.packages('tdplyr',repos=c('https://teradata-download.s3.amazonaws.com','https://cloud.r-
project.org'))
but fail to install because of the same error again. Hope someone could advise on fix.
My sessioninfo is below:
sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
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] rlang_0.4.10 teradatasql_17.0.0.8 odbc_1.3.0 dplyr_1.0.2
[5] dbplyr_2.0.0 digest_0.6.27 DBI_1.1.0 hms_0.5.3
[9] bit64_4.0.5 bit_4.0.4
loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 rstudioapi_0.13 magrittr_1.5 tidyselect_1.1.0 R6_2.4.1
[6] blob_1.2.1 tools_4.0.3 xfun_0.20 tinytex_0.28 ellipsis_0.3.1
[11] assertthat_0.2.1 tibble_3.0.4 lifecycle_0.2.0 crayon_1.3.4 zip_2.1.1
[16] purrr_0.3.4 vctrs_0.3.6 glue_1.4.2 openxlsx_4.2.3 stringi_1.5.3
[21] compiler_4.0.3 pillar_1.4.6 generics_0.0.2 pkgconfig_2.0.3
found the answer myself. Pasting the answer below.
The Teradata R package is incompatible with dbplyr v2.0.0 and its later versions, which introduced some breaking changes. To use tdplyr, the version of dbplyr package must be v1.4.4. tdplyr should be installed using the following commands from your Terminal (for Linux and Mac) or Command Prompt (for Windows), till a new version that is compatible with dbplyr v2.0.0 and its later versions is released:
Install dbplyr v1.4.4 first. There are various ways to install a specific version of a R package. Teradata recommends using the following command:
Rscript -e "remotes::install_version('dbplyr',version='1.4.4',repos='https://cloud.r-project.org')"
Note: To run this above command, the R package remotes should be present on the client machine.
Next to download and install tdplyr and dependencies automatically, if minimum required versions are not met, specify the Teradata R package repository and CRAN in the repos argument for install.packages.
Rscript -e "install.packages('tdplyr',repos=c('https://teradata-download.s3.amazonaws.com','https://cloud.r-project.org'))"
I am using rstudio Version 1.2.1335.
I updated all my package using rstudio. So everything should be updated.
The strange thing was it was working for me a few hours ago when I was using R 3.6.0. Then it stopped working. Then I updated my R to 3.6.3 just now, but still not working. It either gives me an error or it will be running for so long I have to alt+ctrl+del to quit rstudio.
companyinfo() works
but getbalancesheet, getincome, getcashflow do not work. Anyone know why? Thank you.
I received the following error, which seems to has an impossible URL, don't know why and how can I fix it?:
GetBalanceSheet("SQ",2019) (SQ is the company Square inc)
> Error in fileFromCache(file) : Error in download.file(file,
> cached.file, quiet = !verbose) : cannot open URL
> 'https://www.sec.gov/Archives/edgar/data/1512673/000151267319000003/https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd'
>
> In addition: Warning message: In download.file(file, cached.file,
> quiet = !verbose) : cannot open URL
> 'https://www.sec.gov/Archives/edgar/data/1512673/000151267319000003/https://xbrl.sec.gov/dei/2018/dei-2018-01-31.xsd':
> HTTP status was '404 Not Found'
Thank you for the reply. I tried GetBalanceSheet("FB", 2019), it gives me a similar error. I think the URL it is showing in the error message suggest the function is trying to open an invalid URL.
Below is my session info
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
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] finreportr_1.0.1 edgar_2.0.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 rstudioapi_0.11 knitr_1.28 xml2_1.2.5
[5] magrittr_1.5 tidyselect_1.0.0 tm_0.7-7 R6_2.4.1
[9] rlang_0.4.5 stringr_1.4.0 dplyr_0.8.5 tools_3.6.3
[13] parallel_3.6.3 xfun_0.12 R.oo_1.23.0 assertthat_0.2.1
[17] tibble_2.1.3 crayon_1.3.4 NLP_0.2-0 purrr_0.3.3
[21] R.utils_2.9.2 curl_4.3 glue_1.3.2 slam_0.1-47
[25] qdapRegex_0.7.2 stringi_1.4.6 compiler_3.6.3 pillar_1.4.3
[29] R.methodsS3_1.8.0 XML_3.99-0.3 pkgconfig_2.0.3
Update
I found that if I use a VPN....then the function work...is SEC blocking my IP??? is the even possible?
Im building an R package and when testing the package using devtools::check() I get an error when the test reaches the installation phase, saying:
Error: .onLoad failed in loadNamespace() for 'pillar', details:
call: utils::packageVersion("vctrs")
error: there is no package called 'vctrs'
Execution halted
ERROR: lazy loading failed for package
Neither pillar nor vctrs are mentioned in my description file, so they must be dependents of some other package that I depend on. Both pillar and vctrs are installed and I've also tried reinstalling them. They are stored in the the first .libPath entry. I tried installing pillar from github as was suggested by mfox9 here, but this failed for me, giving this error:
> devtools::install_github("r-lib/pillar")
Downloading GitHub repo r-lib/pillar#master
√ checking for file 'C:\Users\DESCRIPTION' (337ms)
- preparing 'pillar': (664ms)
√ checking DESCRIPTION meta-information ...
- installing the package to process help pages
- checking for LF line-endings in source and make files and shell scripts (8.5s)
- checking for empty or unneeded directories
- building 'pillar_1.4.2.9001.tar.gz'
Installing package into ‘Z:/’
(as ‘lib’ is unspecified)
The filename, directory name, or volume label syntax is incorrect.
Error: Failed to install 'pillar' from GitHub:
(converted from warning) installation of package ‘C:/Users/Temp/RtmpgjFfZl/file32586b634e28/pillar_1.4.2.9001.tar.gz’ had non-zero exit status
(note: z:/ is my correct R library address)
Can someone please help?
´´´
> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 15063)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pillar_1.4.2
loaded via a namespace (and not attached):
[1] Rcpp_1.0.2 rstudioapi_0.10 magrittr_1.5 usethis_1.5.1
[5] devtools_2.2.0 pkgload_1.0.2 R6_2.4.0 rlang_0.4.0
[9] tools_3.6.1 pkgbuild_1.0.5 DT_0.8 packrat_0.5.0
[13] sessioninfo_1.1.1 cli_1.1.0 withr_2.1.2 remotes_2.1.0
[17] htmltools_0.3.6 ellipsis_0.2.0.1 assertthat_0.2.1 digest_0.6.20
[21] rprojroot_1.3-2 crayon_1.3.4 processx_3.4.1 callr_3.3.1
[25] fs_1.3.1 htmlwidgets_1.3 ps_1.3.0 curl_4.0
[29] testthat_2.2.1 glue_1.3.1 memoise_1.1.0 compiler_3.6.1
[33] desc_1.2.0 backports_1.1.4 prettyunits_1.0.2
´´´