The code can run through on my desktop. I tried to run it on a server and got error
Error: Package 'RcppArmadillo' referenced from Rcpp::depends in source file is not available.
I wonder if something wrong when I installed the packages but I have no idea how to fix it.
The R script is like this
> library(Rcpp,lib="~/R_libs")
> library(RcppArmadillo,lib="~/R_libs")
> library(gtools,lib="~/R_libs")
> Rcpp::sourceCpp('~/Test/probit2.cpp')
Error: Package 'RcppArmadillo' referenced from Rcpp::depends in source
file probit2.cpp is not available.`
And the cpp file begins with this
#include "RcppArmadillo.h"
// [[Rcpp::depends(RcppArmadillo)]]
using namespace Rcpp;
Thanks in advance!