File: HTML.function.Rd

package info (click to toggle)
r-cran-r2html 2.3.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 976 kB
  • sloc: javascript: 832; xml: 56; makefile: 12; sh: 8
file content (46 lines) | stat: -rwxr-xr-x 1,217 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
\name{HTML.function}
\alias{HTML.function}

\title{Writes the code of a function to a target HTML file }
\description{
  Writes the code of a function to a target HTML file 
}
\usage{\method{HTML}{function}(x, file = HTMLGetFile(), append=TRUE,...)
}

\arguments{
  \item{x}{ Name of a function }
  \item{file}{ target HTLM output}
  \item{append}{ logical. If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of 'file'}
  \item{\dots}{ ...}
}
\details{
  The code of the function is written in the target HTML file, using HTML <XMP> tag. A CSS class called "function" is used to personalise the output.
}
\value{
	no value returned.  
}
\author{ Eric Lecoutre }

\note{ For a discussion about .HTML.file default value for file argument, refer to \code{\link{HTMLStart}} }

\seealso{  \code{\link{HTML}}}

\examples{

## Define a function and export it's code to the file /test.html.
## Target file may be changed when submitting this code...

myfile <- paste(tempfile(),".html",sep="")
myfun <- function(x){
	cat("\n Euclidian norm")
	return(sqrt(sum(x^2)))
 }
HTML(myfun,file=myfile)
cat("\n Test output written in: ",myfile)

}

\keyword{ print }
\keyword{ IO }
\keyword{ file }