Short answer : No, and you shouldn't.
Longer answer:
R is built under the GNU GPL license version 2. So the idea is that whenever
you make something for R and spread it around, you give the source code as
well. If you don't want functions to be loaded in the general environment,
you can eg create a package with S4 classes and methods, and then the
functions will only show
function (x, ...)
UseMethod("aMethod")
<environment: namespace:aPackage>
But still, there are ways to get the code out. And in any case, you should
provide the source code as well.
Cheers
Joris
PS : I didn't figure out yet how to get the source code of a method showig
On Fri, May 7, 2010 at 6:00 AM, Megh Dal <megh700004@yahoo.com> wrote:
> Hi all, previously I submitted this thread through Nabble which seems fail
> therefore sending it again....
> suppose I have written following function :
>
> > fn = function(x) return(x+x^2)
> > fn
> function(x) return(x+x^2)
>
> Here you see, if I type only the function name all inside information of
> this function are visible. Is there any way to protect them i.e. make them
> invisible?
>
> Thanks
>
>
>
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help@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.
>
>
--
Joris Meys
Statistical Consultant
Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control
Coupure Links 653
B-9000 Gent
tel : +32 9 264 59 87
Joris.Meys@Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php
[[alternative HTML version deleted]]