One error when I run my R code about .stan file - r

I execute a code in R as following
model <- rstan::stan_model('ex_05_13.stan')
But there is an error as following:
Error in compileCode(f, code, language = language, verbose = verbose) : sh: c:/rtools40/mingw64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-40~1.2/etc/x64/Makeconf:229: file492c7acd69ff.o] Error 127
In addition: Warning message:
In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) : '-E' not found Error in sink(type = "output") : invalid connection
My ex_05_13.stan is syntactically correct. I don`t know why I cannot run my ".stan"? Thank you.

Face similar problem... Looks like a folder had previously made so the new R Tools cannot be installed and run the program properly

Related

R: why is covr::package_coverage() always throws me an error starting with Error: Failure in `/tmp/RtmptOqbpy/R_LIBS5b33c260c72/....`

I have a package that fails when i run covr::package_coverage(quiet = FALSE, clean = FALSE) or devtools::test_coverage with error message: Error: Failure in /tmp/RtmptOqbpy/R_LIBS5b33c260c72/package/package-tests/testthat.Rout.fail, anyone knows why this happens? I'm on linux

Warning message: 'c:/Rtools/mingw_/bin/g++' not found

When I try to use RStan (which needs RTools to run) in R, I get the following warning message:
Warning message: In system(paste(CXX, ARGS), ignore.stdout = TRUE,
ignore.stderr = TRUE) : 'c:/Rtools/mingw_/bin/g++' not found
But, when I check in the 'c:/Rtools/' folder, I find two 'mingw_' files, called 'mingw_32' and 'min_gw64', and in both folders there is already a 'bin/g++' file. Why do I get this warning then? Is it wrong to have two folders, one 32 and one 64 bits?
delete your old .Rprofile and try again. This helped in my case

issue in getting data with getGEO in R

I want to download the soft file of the GPL6480 platform in R.
I've used this command :
gset<-getGEO("GPL6480")
but I faced with this problem:
curl: (6) Could not resolve host: www.ncbi.nlm.nih.gov
File stored at:
/tmp/RtmpbHgZqQ/GPL6480.soft
Error in file(fname, "r") : cannot open the connection
In addition: Warning messages:
1: In download.file(myurl, destfile, mode = mode, quiet = TRUE, method = getOption("download.file.method.GEOquery")) :
download had nonzero exit status
2: In file(fname, "r") :
cannot open file '/tmp/RtmpbHgZqQ/GPL6480.soft': No such file or directory
I googled for this problem but I can't find the answer. acctauly i don't know that what is the problem exactly.you should know that my connection to net is ok.
I'm using R version 3.2.0 on Ubuntu 14.04.2 trusty
tnx mansoor

tm readPDF: Error in file(con, "r") : cannot open the connection

I have tried the example code recommended in the tm::readPDF documentation:
library(tm)
if(all(file.exists(Sys.which(c("pdfinfo", "pdftotext"))))) {
uri <- system.file(file.path("doc", "tm.pdf"), package = "tm")
pdf <- readPDF(PdftotextOptions = "-layout")(elem = list(uri = uri),
language = "en",
id = "id1")
pdf[1:13]
}
But I get the following error (which occurs after calling the function returned by readPDF):
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
cannot open file 'C:\DOCUME~1\Tomas\LOCALS~1\Temp\RtmpU33iWo\pdfinfo31c2bd5762a': No such file or directory
Note that I have installed all xpdf binaries to current directory (but this is handled by the if condition).
EDIT: found out this is a bug. What would be the easiest workaround?
Did some debugging and see it fails in tm:::pdfinfo():
status <- system2("pdfinfo", shQuote(normalizePath(file)),
stdout = outfile)
This command doesn't create the outfile. According to Redirect system2 stdout to a file on windows this is a bug!

Run texi2pdf without calling bibtex

When I run texi2pdf (or texi2dvi) I get the error below. Is it possible to have the texi2dvi function execute LaTeX without bibtex?
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet, :
Running 'texi2dvi' on 'FactBook-Supplement.Rnw' failed.
BibTeX errors:
I found no \bibdata command---while reading file O:\Institutional Research\IR metrics\Fact Book\Supplement\build\2012-Winter.0\FactBook-Supplement.aux
I found no \bibstyle command---while reading file O:\Institutional Research\IR metrics\Fact Book\Supplement\build\2012-Winter.0\FactBook-Supplement.aux

Resources