I'm trying to get an instance of a reference class (vonBertalanffyInterface) from the R environment with the following code:
void SetName(vonBertalanffyInterface& v) { Rcpp::Environment env = Rcpp::Environment::global_env(); Rcpp::List l = Rcpp::as<Rcpp::List>(env.ls(true)); for (int i = 0; i < l.size(); i++) { std::cout << typeid (l[i]).name() << std::endl; if(&v == l[i].get()){ v.name Rcpp::as<std::string>(l[i]); } } } The problem is that elements in the list are of type *N4Rcpp8internal13generic_proxyILi19ENS_15PreserveStorageEEE*. I'm assuming that PreserveStorage is a wrapper class. Is there a way to retrieve the reference class from the PreserveStorage object? Thanks. Matthew -- Matthew Supernaw *Scientific Software Developer* *National Oceanic and Atmospheric Administration* *Office Of Science and Technology* *NOAA Fisheries | *U.S. Department of Commerce Phone 248 - 396 - 7797
_______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel