Re: [R] How to hiding code for a package

2005-08-02 Thread Spencer Graves
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

Re: [R] How to hiding code for a package

2005-08-01 Thread Gary Wong
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 > >> > >> >

Re: [R] How to hiding code for a package

2005-08-01 Thread Spencer Graves
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 >

Re: [R] How to hiding code for a package

2005-08-01 Thread bogdan romocea
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

Re: [R] How to hiding code for a package

2005-08-01 Thread Tuszynski, Jaroslaw W.
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

Re: [R] How to hiding code for a package

2005-07-30 Thread Gabor Grothendieck
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

Re: [R] How to hiding code for a package

2005-07-30 Thread Prof Brian Ripley
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

[R] How to hiding code for a package

2005-07-30 Thread Gary Wong
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