<div dir="ltr">Hi Jeff, <div>I'm not sure I understand your comment. The code is part of a package. We're just trying to sync the declared object name in the R environment to the object in the Rcpp module programmatically from c++ for internal use. I just wondered if there was a way to access the wrapped object in the Rcpp:::PreserveStorage class and Dirk answered that question.</div><div>Thanks.</div><div>Matthew</div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 24, 2023 at 2:34 PM Jeff Newmiller <<a href="mailto:jdnewmil@dcn.davis.ca.us">jdnewmil@dcn.davis.ca.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Matthew... the normal context for sharing Rcpp code is within a package. It is a no-brainer to have an R API called by the user that calls whatever Rcpp code it needs to, which is why your objection seems inappropriate to me.<br>
<br>
On March 24, 2023 10:43:34 AM PDT, Dirk Eddelbuettel <<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>> wrote:<br>
><br>
>On 24 March 2023 at 13:08, Matthew Supernaw - NOAA Federal wrote:<br>
>| I'm sure it's possible to do from the R side, however, the requirement is to<br>
>| hide this from the end user and set the reference objects name to the declared<br>
>| name from the R environment. If I view the environment in RStudio, there is<br>
>| much more information available. ls() only returns a list of objects by their<br>
>| declared name. I'm wondering how to get more details about elements in the<br>
>| environment.<br>
><br>
>Thanks for additional color.  That may be a very interesting and valuable<br>
>question _for the C API of R_ and youe guess of "maybe Rcpp has a helper" is<br>
>a good one.  Sadly, I fear we may not have anything for you.  <br>
><br>
>Dirk<br>
><br>
>-- <br>
><a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
>_______________________________________________<br>
>Rcpp-devel mailing list<br>
><a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
-- <br>
Sent from my phone. Please excuse my brevity.<br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="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>