Package‘R2HTML’
August29,2013
Version2.2.1
Date2010-03-12
Title HTML exportation for R objects
Author Eric Lecoutre<eric.lecoutre@gmail>
Maintainer ORPHANED
Depends R(>=2.0)
Suggests boot,splines,survival,stats,cluster,nlme,rpart,nnet,utils Description Includes HTML function and methods to write in an HTML file.Thus,making HTML reports is easy.Includes a function
that allows redirection on thefly,which appears to be very
usefull for teaching purpose,as the student can keep a copy of
the produced output to keep all that he did during the course.
Package comes with a vignette describing how to write HTML
reports for statistical analysis.Finally,a driver for Sweave
allows to parse HTMLflatfiles containing R code and to
automatically write the corresponding outputs(tables and graphs). License GPL(>=2)
URL
Repository CRAN
Date/Publication2013-04-0609:27:20
NeedsCompilation no
X-CRAN-Original-Maintainer Eric Lecoutre<eric.lecoutre@gmail> X-CRAN-Comment Orphaned on2013-04-06:updates since2010have been done by the CRAN team.
1
2HTLMReplaceNA
R topics documented:
HTLMReplaceNA (2)
HTM2clip (3)
HTML (4)
HTML.data.frame (6)
HTML.function (8)
HTML.latex (10)
HTML.title (11)
HTMLbr (12)
HTMLChangeCSS (13)
HTMLCSS (14)
HTMLgrid (15)
HTMLInitFile (17)
HTMLInsertGraph (18)
HTMLplot (19)
HTMLStart (21)
HTMLstem (23)
RweaveHTML (24)
Index25 HTLMReplaceNA Internal R2HTML functions
Description
Internal R2HTML functions
Usage
HTMLReplaceNA(Vec,Replace="")
HTMLCommand(x,file=get(".HTML.file"),Num="",menu=FALSE,target="index<-main.html",append HTMLcode(x,...)
Arguments
Vec string
Replace string to use for missing values
x a string corresponding to a R command
file the target HTMLfile
Num number of the command
menu to build a menu of commands
target As command is put in a left frame,name of the linked target HTML page
append logical.If’TRUE’output will be appended to’file’;otherwise,it will overwrite
the contents of’file’
html frame
......
HTM2clip3
Details
These are not to be called by the user.
HTM2clip Wrapper around HTML()to save output to the clipboard
Description
Calls HTML()with appropriatefilename and append attributes to write output to clipboard(cur-
rently only works on Windows).
Usage
HTML2clip(x,filename=file("clipboard",ifelse(.Platform$OS=="windows","w",stop("Writing to clip
Arguments
x object to be output to HTML
filename destination outputfile,defaults to clipboard
append logical.If’TRUE’output will be appended to’file’;otherwise,it will overwrite
the contents of’file’decides if thefilevalue of the width HR optional argument,
in pixel or percent
......(passed on to HTML())
Value
no value returned.
Note
This function was contributed by Gabor Grothendieck.
Author(s)
Eric Lecoutre
See Also
HTML
Examples
if(.Platform$OS=="windows")
HTML2clip(summary(lm(rating~.,attitude)))
4HTML HTML Outputs an object to a HTMLfile
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 is set to hidden vari-
able.HTML.file,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.
Note
For a discussion about.HTML.file default value forfile argument,refer to HTMLStart
Author(s)
Eric Lecoutre
See Also
HTML.data.frame,HTML.function,HTMLStart
Examples
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(1  ),ncol=1 ))
HTML(tmp,file=target)
HTMLEndFile()
Description
Although the class‘cormat’is not defined,the function is called at,to highlight the
fact it should be called only with a correlation matrix.
Usage
x a correlation matrix
file target HTLM output
digits number of digits to use for rounding
append logical.If’TRUE’output will be appended to’file’;otherwise,it will overwrite
the contents of’file’
align alignment to be used:center,left or right
caption optional caption to append to the table
captionalign alignment to be used for the caption:could be bottom or top
classcaption CSS class to use for caption
classtable CSS class to be used for the whole table(in html<table>statement)
useCSS whether to use CSS or not for traffic highlighting
.
.....
Value
returns(invisibly)the input
Note
“Highlighting traffic”is a simple technique which allows to have a visual representation of data.It
is particularly well suited for correlation matrices in order to have at a glance the underlying(linear)
structure of data.If your output doesn’t rely on CSS styles,you should use useCSS=FALSE option,
whihc hard codes grey levels for correlations.
For CSS uses,you can(re)define colours and other attributes for correlations in seq( ,1,length=11)-
defined intervals.Some definitions could be equivalent,not showing any difference.You can,by
example,redefine CSS so that only correlations greater than0.9are showned,and lower the size of
cells,which could be usefull for veryu big datasets.
Author(s)
Eric Lecoutre

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。