Installation error


I followed these steps to install rstan: RStan Getting Started · stan-dev/rstan Wiki · GitHub

Including these steps: Configuring C Toolchain for Windows · stan-dev/rstan Wiki · GitHub

Everything looked ok with no errors until I ran
install.packages(“rstan”, repos = “”, dependencies = TRUE)

and received this error:

* installing *source* package 'rstan' ...
** package 'rstan' successfully unpacked and MD5 sums checked
** libs

*** arch - i386
Error in .shlib_internal(args) : 
  C++14 standard requested but CXX14 is not defined

Can you advise what the issue is?

My file looks like

CXX14FLAGS += -mtune=native -O3 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -msse4.2

I have r version 3.5.2 and Rtools version I can install a package from source.

I also tried installing from cran and received the same errror.

Thank you

Any suggestions on this issue?

Can you try running:

cat("CXX14 = $(BINPREF)g++ -std=c++1y",
    file = "~/.R/", sep = "\n", append = TRUE)

Then restart R and try the install again?

After running that I received this warning message:

Warning message:
In normalizePath(path.expand(path), winslash, mustWork) :
  path[1]="NA": The system cannot find the file specified

But it did successfully install 2.21.2

Thank you!