I am trying to open a file within an Rcpp function, so I need the file name as a char* or std::string.
So far, I have tried the following:
#include &
Rcpp::as() expects a SEXP as input, not a Rcpp::CharacterVector. Try passing the f1 parameter directly to Rcpp::as(), eg:
Rcpp::as()
SEXP
Rcpp::CharacterVector
f1
std::string fname = Rcpp::as(f1);
Or: