Skip to content
Prev 8604 / 63424 Next

Flat documentation?

Dear Duncan,
At 10:51 AM 12/12/2002 -0500, Duncan Murdoch wrote:
I was assuming the use of your third style. At present -- in the absence of 
multiline comments -- that would require #ing each comment line at the 
start of the function.

Alternatively, you could create a separate text file, say sum.txt, and 
define the function as:

         sum <- function(x, y) x + y
         doc(sum, "sum.txt")

[or sum <- doc(sum, "sum.txt") for an implementation of doc() without side 
effects.]

Either method should work whether functions are kept in text files or in 
saved workspaces.
Regards,
  John

-----------------------------------------------------
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario, Canada L8S 4M4
email: jfox@mcmaster.ca
phone: 905-525-9140x23604
web: www.socsci.mcmaster.ca/jfox
-----------------------------------------------------