<div dir="ltr"><div>I'm trying to get an instance of a reference class (vonBertalanffyInterface) from the R environment with the following code:</div><div><br></div><div>void SetName(vonBertalanffyInterface& v) {<br><br>    Rcpp::Environment env = Rcpp::Environment::global_env();<br>    Rcpp::List l = Rcpp::as<Rcpp::List>(<a href="http://env.ls">env.ls</a>(true));<br><br>    for (int i = 0; i < l.size(); i++) {<br>        std::cout << typeid (l[i]).name() << std::endl;<br>        <br>        if(&v == l[i].get()){<br>            <a href="http://v.name">v.name</a> Rcpp::as<std::string>(l[i]);<br>        }<br>    }<br>}<br></div><div><br></div><div>The problem is that elements in the list are of type<b><i> </i></b><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><b><i>N4Rcpp8internal13generic_proxyILi19ENS_15PreserveStorageEEE</i></b>.</span></div><div><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br></span></div><div>I'm assuming that PreserveStorage is a wrapper class. Is there a way to retrieve the reference class from the PreserveStorage object?<span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0);font-family:Menlo;font-size:11px"><br></span></div><div>Thanks.</div><div>Matthew</div>





<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br clear="all"><div><br></div><span>-- </span><br><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div>Matthew Supernaw<br><i><font color="#666666">Scientific Software Developer</font></i></div><div><span style="line-height:16px;font-family:arial,sans-serif"><em><font color="#666666">National Oceanic and Atmospheric Administration</font></em></span></div><div><i><font face="arial, sans-serif" color="#666666">Office Of Science and Technology</font></i></div><div><font color="#666666"><i><font face="arial, sans-serif">NOAA Fisheries | </font></i><span style="font-family:Arial;font-size:13.3333px;white-space:pre-wrap">U.S. Department of Commerce</span></font></div><div><font color="#666666">Phone 248 - 396 - 7797</font><br><br></div><br></div></div></div>