search for: deffunhdr

Displaying 2 results from an estimated 2 matches for "deffunhdr".

2002 Nov 04
2
Sweave - documenting a long function
...s it possible to split the function's code into chunks such that Sweave will accept each chunk without complaining. I have tried various approaches without sucess but I feel sure that someone has done this already. Here is one attempt ============== % First, define the funciton header <<defFunHdr, eval=FALSE>>= x <- function(a =1) @ % Explain the code in the first part of the function <<defFunBodyPt1, eval=FALSE>>= { a <- a+1 @ % Explain the code in the second part of the function <<defFunBodyPt2, eval=FALSE>>= a <- a^2 a } # end of function @ %...
2002 Nov 05
0
summary: Sweave - documenting a long function
...s it possible to split the function's code into chunks such that Sweave will accept each chunk without complaining. I have tried various approaches without sucess but I feel sure that someone has done this already. Here is one attempt ============== % First, define the funciton header <<defFunHdr, eval=FALSE>>= x <- function(a =1) @ % Explain the code in the first part of the function <<defFunBodyPt1, eval=FALSE>>= { a <- a+1 @ % Explain the code in the second part of the function <<defFunBodyPt2, eval=FALSE>>= a <- a^2 a } # end of function @ %...