Last data update: 2014.03.03

R: Outputs an object to a HTML file
HTMLR Documentation

Outputs an object to a HTML file

Description

Generic method equivalent to print that performs HTML output for any R object.

Usage

HTML(x, ...)

Arguments

x

R object to export

...

...

Details

HTML function acts like cat, with a file argument, which has to be used and a append argument, which is set by default to TRUE. A convenient default value for file argument can be set by calling HTMLInitFile or HTMLSetFile, so that one may begin to set this variable and omit the argument thereafter. Most of the current classes are handled by HTML function. Some specific methods such as HTML.matrix or HTML.data.frame do own a lot of arguments to specify the way the data are exported.

Value

no value returned.

Author(s)

Eric Lecoutre

See Also

HTML.data.frame,HTML.function, HTMLInitFile, HTMLStart

Examples

dir.create(file.path(tempdir(),"R2HTML"))
target <- HTMLInitFile(file.path(tempdir(),"R2HTML"),filename="sample", BackGroundColor="#BBBBEE")
HTML("<br>Don't forget to use the CSS file in order to benefit from fixed-width font",file=target)
tmp <- as.data.frame(matrix(rnorm(100),ncol=10))
HTML(tmp,file=target)
HTMLEndFile()

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(R2HTML)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/R2HTML/HTML.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HTML
> ### Title: Outputs an object to a HTML file
> ### Aliases: HTML HTML.anova HTML.aov HTML.aovlist HTML.array HTML.atomic
> ###   HTML.by HTML.call HTML.character HTML.coefmat HTML.complex
> ###   HTML.connection HTML.default HTML.density HTML.difftime
> ###   HTML.dummy.coef HTML.dummy.coef.list HTML.environment HTML.factor
> ###   HTML.family HTML.formula HTML.ftable HTML.glm HTML.glm.null
> ###   HTML.hsearch HTML.htest HTML.infl HTML.integer HTML.integrate
> ###   HTML.list HTML.listof HTML.lm HTML.lm.null HTML.logical HTML.logLik
> ###   HTML.MethodsFunction HTML.mtable HTML.noquote HTML.numeric
> ###   HTML.octmode HTML.ordered HTML.pairlist HTML.POSIXct HTML.POSIXlt
> ###   HTML.rle HTML.SavedPlots HTML.simple.list HTML.socket
> ###   HTML.summary.aov HTML.summary.aovlist HTML.summary.glm
> ###   HTML.summary.glm.null HTML.summary.lm HTML.summary.lm.null
> ###   HTML.summary.manova HTML.summary.table HTML.table HTML.tables.aov
> ###   HTML.terms HTML.ts HTML.TukeyHSD HTML.xtable HTML.xtabs HTML.abbrev
> ###   HTML.agnes HTML.Anova HTML.anova.loglm HTML.ar HTML.Arima HTML.arima0
> ###   HTML.boot HTML.bootci HTML.bSpline HTML.clara HTML.correspondence
> ###   HTML.cox.zph HTML.coxph.null HTML.diana HTML.dissimilarity HTML.dist
> ###   HTML.ecdf HTML.ellipsoid HTML.factanal HTML.fanny HTML.fitdistr
> ###   HTML.fractions HTML.gam HTML.gamma.shape HTML.glm.dose HTML.grob
> ###   HTML.hclust HTML.HoltWinters HTML.lda HTML.libraryIQR HTML.loadings
> ###   HTML.loess HTML.loglm HTML.lqs HTML.mca HTML.medpolish HTML.mona
> ###   HTML.multinom HTML.nls HTML.nnet HTML.pairwise.htest HTML.pam
> ###   HTML.polr HTML.polySpline HTML.power.htest HTML.ppolySpline HTML.ppr
> ###   HTML.prcomp HTML.princomp HTML.qda HTML.ridgelm HTML.rlm
> ###   HTML.rms.curv HTML.rpart HTML.saddle.distn HTML.shingle
> ###   HTML.shingleLevel HTML.simplex HTML.smooth.spline HTML.stepfun
> ###   HTML.stl HTML.StructTS HTML.structure HTML.summary.agnes
> ###   HTML.summary.clara HTML.summary.diana HTML.summary.fanny
> ###   HTML.summary.gam HTML.summary.loess HTML.summary.loglm
> ###   HTML.summary.mona HTML.summary.multinom HTML.summary.negbin
> ###   HTML.summary.nls HTML.summary.nnet HTML.summary.pam HTML.summary.polr
> ###   HTML.summary.ppr HTML.summary.prcomp HTML.summary.princomp
> ###   HTML.summary.rlm HTML.tskernel HTML.tukeyline HTML.tukeysmooth
> ###   HTML.unit HTML.viewport HTML.reStruct HTML.summary.lme
> ###   HTML.summary.pdDiag
> ### Keywords: print IO file
> 
> ### ** Examples
> 
> dir.create(file.path(tempdir(),"R2HTML"))
> target <- HTMLInitFile(file.path(tempdir(),"R2HTML"),filename="sample", BackGroundColor="#BBBBEE")
> HTML("<br>Don't forget to use the CSS file in order to benefit from fixed-width font",file=target)
> tmp <- as.data.frame(matrix(rnorm(100),ncol=10))
> HTML(tmp,file=target)
> HTMLEndFile()
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>