1\name{HTML.function}
2\alias{HTML.function}
3
4\title{Writes the code of a function to a target HTML file }
5\description{
6  Writes the code of a function to a target HTML file
7}
8\usage{\method{HTML}{function}(x, file = HTMLGetFile(), append=TRUE,...)
9}
10
11\arguments{
12  \item{x}{ Name of a function }
13  \item{file}{ target HTLM output}
14  \item{append}{ logical. If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of 'file'}
15  \item{\dots}{ ...}
16}
17\details{
18  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.
19}
20\value{
21	no value returned.
22}
23\author{ Eric Lecoutre }
24
25\note{ For a discussion about .HTML.file default value for file argument, refer to \code{\link{HTMLStart}} }
26
27\seealso{  \code{\link{HTML}}}
28
29\examples{
30
31## Define a function and export it's code to the file /test.html.
32## Target file may be changed when submitting this code...
33
34myfile <- paste(tempfile(),".html",sep="")
35myfun <- function(x){
36	cat("\n Euclidian norm")
37	return(sqrt(sum(x^2)))
38 }
39HTML(myfun,file=myfile)
40cat("\n Test output written in: ",myfile)
41
42}
43
44\keyword{ print }
45\keyword{ IO }
46\keyword{ file }
47