Last data update: 2014.03.03

R: Writes a title in a target HTML output
HTML.titleR Documentation

Writes a title in a target HTML output

Description

A title is a string with the S3 class "title". The function as.title gives this class to an object, so that title method of HTML could apply to it. However, it is also possibly to call this method, explicitly, providing a plain string.

Usage

## S3 method for class 'title'
HTML(x, HR = 2, CSSclass=NULL,
file = HTMLGetFile(), append=TRUE,...)
as.title(x)

Arguments

x

string

HR

rank attribute of the HTML <H?> tag

CSSclass

CSS class to use for personalised reports

file

the target HTML file

append

logical. If 'TRUE' output will be appended to 'file'; otherwise, it will overwrite the contents of 'file'

...

...

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

HTML

Examples

## Write a title in the file /test.html.
## Target file may be changed when submitting this code...

myfile <- paste(tempfile(),".html",sep="")

tit1 <- as.title("This is method 1")

HTML(tit1, file=myfile)

HTML.title("This is method 2",file=myfile, HR=3)
cat("\n Test output written in: ",myfile)


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.title.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HTML.title
> ### Title: Writes a title in a target HTML output
> ### Aliases: HTML.title as.title
> ### Keywords: print IO file
> 
> ### ** Examples
> 
> ## Write a title in the file /test.html.
> ## Target file may be changed when submitting this code...
> 
> myfile <- paste(tempfile(),".html",sep="")
> 
> tit1 <- as.title("This is method 1")
> 
> HTML(tit1, file=myfile)
> 
> HTML.title("This is method 2",file=myfile, HR=3)
> cat("\n Test output written in: ",myfile)

 Test output written in:  /tmp/RtmptIlQpS/file1db0149ede40.html> 
> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>