Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

HTML.function

Writes the code of a function to a target HTML file


Description

Writes the code of a function to a target HTML file

Usage

## S3 method for class 'function'
HTML(x, file = HTMLGetFile(), append=TRUE,...)

Arguments

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'

...

...

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.

Note

For a discussion about .HTML.file default value for file argument, refer to HTMLStart

Author(s)

Eric Lecoutre

See Also

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)

R2HTML

HTML Exportation for R Objects

v2.3.2
GPL (>= 2)
Authors
Eric Lecoutre [aut], Milan Bouchet-Valat [cre, ctb], Thomas Friedrichsmeier [ctb]
Initial release
2016-06-23

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.