>
> After some private email with some high level programmer (Gabor), I have
shouldn't that rather be: high in knowledge but low in level?
Best,
Hans-Peter
[[alternative HTML version deleted]]
___
After some private email with some high level programmer (Gabor), I have
the solution and I can answer to my own question :-)
The problem was 1° to define a function B( ) available only in a
function A( ) (for code safeness) and 2° to define B( ) elsewhere than
in A( ) (for code readability)
On 23/02/2008 8:22 AM, Christophe Genolini wrote:
> Ok, I saw FUNx
> So, I reformulate my question : is there a way, without nesting b( ) in
> a( ), to make b( ) available only in a( ) ?
Not that I know of. It will be available to anything using the same
environment as a(), which in the case of
Ok, I saw FUNx
So, I reformulate my question : is there a way, without nesting b( ) in
a( ), to make b( ) available only in a( ) ?
> Just to clarify, what Duncan was referring to as the
> alternative was nesting the definition of one function
> in another, e.g. look at FUNx in by.data.frame --
> F
Just to clarify, what Duncan was referring to as the
alternative was nesting the definition of one function
in another, e.g. look at FUNx in by.data.frame --
FUNx is available to by.data.frame but is not
visible outside of by.data.frame .
On Sat, Feb 23, 2008 at 6:09 AM, Duncan Murdoch <[EMAIL PRO
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
It depends what you mean by 'hiding', 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
On 23/02/2008 5:58 AM, Christophe Genolini wrote:
> Duncan Murdoch a écrit :
>> On 23/02/2008 5:15 AM, Christophe Genolini wrote:
>>> Hi the list
>>>
>>> Is it possible to 'hide' a function from the user ? I cut a big
>>> fonction in sub
>>> function and I would like to hide the sub function, jus
Duncan Murdoch a écrit :
> On 23/02/2008 5:15 AM, Christophe Genolini wrote:
>> Hi the list
>>
>> Is it possible to 'hide' a function from the user ? I cut a big
>> fonction in sub
>> function and I would like to hide the sub function, just like if I
>> declare them
>> in the big function :
>>
>
On 23/02/2008 5:15 AM, Christophe Genolini wrote:
> Hi the list
>
> Is it possible to 'hide' a function from the user ? I cut a big
> fonction in sub
> function and I would like to hide the sub function, just like if I
> declare them
> in the big function :
>
> --
> a <- function(x
Hi the list
Is it possible to 'hide' a function from the user ? I cut a big
fonction in sub
function and I would like to hide the sub function, just like if I
declare them
in the big function :
--
a <- function(x){
b <- function(y){y^2}
d <- function(y){y^3}
b(x)+d(x)+2
}
a(2
11 matches
Mail list logo