Namespace and rstan.so not found when load "rstan" library

rstan

#1

Summary

when i installed rstan then include all dependencies, after installation restart R and load rstan library.
when i was trying to load rstan library then it’s give a error

Error

Session info

@Bob_Carpenter4
@fabio
@randommm
@discourse


#2

Thanks for moving the discussion over here from the issue. (I don’t know the answer, or I would’ve included it there.)


#3

Do

remove.packages("rstan")
q()

then restart R making sure that no old stanfit objects are being autoloaded at startup and do

install.packages("rstan")
library(rstan)

again.


#4

I followed steps suggested by you
now rstan package not installed agian
Give error

When i installed this then follow this url and create Makevars file now it give error in that file.
https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Mac-or-Linux

Please help me i’m stuck in this issue very badly and i spend 2-3 days on this issue.
I want used prophet package for time series and rstan is dependencies for that package :( :(

@bgoodri


#5

What does your file at ~/.R/Makevars contain?


#6

In .R folder has a Makevars file which is contain r command

dotR <- file.path(Sys.getenv(“HOME”), “.R”)
if (!file.exists(dotR)) dir.create(dotR)
M <- file.path(dotR, “Makevars”)
if (!file.exists(M)) file.create(M)


#7

Eliminate all that (which is R code you were supposed to call to create the Makevars file) and paste in

CXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function  -Wno-macro-redefined