[R] retaining comments within functions defined in Rprofile.site

Benjamin Tyner btyner at gmail.com
Sat May 25 23:15:56 CEST 2013


Thank you Duncan; that is a most helpful explanation and suggestion.

On 05/25/2013 09:26 AM, Duncan Murdoch wrote:
> Those files are read in a hard-wired way quite early in the startup
> process, and there's no way to enable keep.source on them.  However,
> there's nothing to stop those files from calling source() on another
> file, and using keep.source=TRUE when they do so.  You could probably
> even hack something together so that Rprofile.site sourced itself, but
> it would be pretty easy to get into an infinite loop if you weren't
> careful...
>
>
> On Fri, May 24, 2013 at 5:46 PM, Benjamin Tyner <btyner at gmail.com
> <mailto:btyner at gmail.com>> wrote:
>
>     Hi,
>
>     I have some functions defined within etc/Rprofile.site which contain
>     embedded comments, but it seems the comments get stripped out when the
>     site profile is sourced into the base namespace. I'm thinking I
>     need to
>     enable options(keep.source=TRUE) somewhere prior to the actual
>     sourcing
>     of the site profile, but haven't been able to figure it out yet. Does
>     anyone have any suggestions?
>
>     Thanks,
>     Ben
>
>
>     ______________________________________________
>     R-help at r-project.org <mailto:R-help at r-project.org> mailing list
>     https://stat.ethz.ch/mailman/listinfo/r-help
>     PLEASE do read the posting guide
>     http://www.R-project.org/posting-guide.html
>     and provide commented, minimal, self-contained, reproducible code.
>
>



More information about the R-help mailing list