Description Usage Arguments Details Value Note Author(s) See Also Examples
Writes the code of a function to a target HTML file
1 2 |
x |
Name of a function |
file |
target HTLM output |
append |
logical. If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of 'file' |
... |
... |
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.
no value returned.
For a discussion about .HTML.file default value for file argument, refer to HTMLStart
Eric Lecoutre
1 2 3 4 5 6 7 8 9 10 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.