Re: [R] Question: write an R script with help information available to the user

2013-02-03 Thread Gabor Grothendieck
On Sun, Feb 3, 2013 at 1:50 AM, Bert Gunter wrote: > A related approach which, if memory serves, was originally in S eons > ago, is to define a "doc" attribute of any function (or object, for > that matter) that you wish to document that contains text for > documentation and a doc() function of

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Bert Gunter
A related approach which, if memory serves, was originally in S eons ago, is to define a "doc" attribute of any function (or object, for that matter) that you wish to document that contains text for documentation and a doc() function of the form: doc <- function(obj) cat(attr(obj,"doc")) used a

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Gabor Grothendieck
On Sat, Feb 2, 2013 at 6:31 PM, Chee Chen wrote: > Dear All, > > I would like to ask a question on how to incorporate into an R script help > information for the user. I vaguely recall that I saw some instructions on an > R manual, but am not able to figure them out. Hereunder is the basic setti

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Jeff Newmiller
The normal expectations of an R user is that useful functions you want to share are in packages, which include help files. There is no way to both avoid the package development process and offer help to the user within R. Read the Writing R Extensions document for the most up-to-date information

[R] Question: write an R script with help information available to the user

2013-02-02 Thread Chee Chen
Dear All, I would like to ask a question on how to incorporate into an R script help information for the user. I vaguely recall that I saw some instructions on an R manual, but am not able to figure them out. Hereunder is the basic setting: 1. I finished writing an R script, my_script.r, that