t;>-Original Message-
>>From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
>>Sent: Saturday, July 30, 2005 5:35 AM
>>To: Gary Wong
>>Cc: r-help@stat.math.ethz.ch
>>Subject: Re: [R] How to hiding code for a package
>>
>>
>>What you ask is
age-
> >>From: Prof Brian Ripley
> [mailto:[EMAIL PROTECTED]
> >>Sent: Saturday, July 30, 2005 5:35 AM
> >>To: Gary Wong
> >>Cc: r-help@stat.math.ethz.ch
> >>Subject: Re: [R] How to hiding code for a package
> >>
> >>
>
t solution would be to compile
> the code, but R is not there yet.
>
>
>
>>-Original Message-
>>From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
>>Sent: Saturday, July 30, 2005 5:35 AM
>>To: Gary Wong
>>Cc: r-help@stat.math.ethz.ch
>
erstand it. The best solution would be to compile
the code, but R is not there yet.
> -Original Message-
> From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
> Sent: Saturday, July 30, 2005 5:35 AM
> To: Gary Wong
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] How
alf Of Gary Wong
Sent: Saturday, July 30, 2005 4:21 AM
To: r-help@stat.math.ethz.ch
Subject: [R] How to hiding code for a package
Hey everyone,
I have made a package and wish to release it but before then I have a
problem. I have a few functions in this package written in R that I wish to
You could set the source attribute like this:
R> f <- function(x) x+1
R> # displays the word hidden instead of showing the source
R> attr(f, "source") <- "hidden"
R> f
hidden
R> f(10) # still works as a function properly
[1] 11
Of course, someone knowledgable could change the source
attribute
What you ask is impossible. For a function to be callable it has to be
locatable and hence can be printed.
One possibility is to have a namespace, and something like
foo <- function(...) foo_internal(...)
where foo is exported but foo_internal is not. Then foo_internal is
hidden from casual
Hey everyone,
I have made a package and wish to release it but
before then I have a problem. I have a few functions
in this package written in R that I wish to hide such
that after installation, someone can use say the
function >foo(parameters = "") but cannot do >foo.
Typing foo should not show t