Re: [R] Hiding a function

From: Christophe Genolini <cgenolin_at_u-paris10.fr>
Date: Sat, 23 Feb 2008 13:03:45 +0100

Gabor Csardi a écrit :
> It depends what you mean by 'hiding',
Well, the main idea was the to limit the existance of a function. a( ) need b( ) but no other function will need b(). So I would have like to let b( ) exists localy only when a( ) is called, not elsewhere.

Christophe
> you can start the function
> names with a dot and then they are not listed by ls(), so this
> is kind of hiding.
>
>
>> .a <- function() TRUE
>> ls()
>>
> character(0)
>
>> .a
>>
> function() TRUE
>
> Personally i would not do this though.
>
> G.
>
> On Sat, Feb 23, 2008 at 11:58:57AM +0100, Christophe Genolini wrote:
> [...]
>
>> If I understand, it is possible only in a package, not in a programme
>> (unless the "other ways"), is that it ?
>> Ok, thanks.
>>
>>
> [...]
>
>

        [[alternative HTML version deleted]]



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. Received on Sat 23 Feb 2008 - 12:09:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 23 Feb 2008 - 12:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive