Last data update: 2014.03.03

R: Creates a HTML grid using ActiveWidget grid -...
HTMLgridR Documentation

Creates a HTML grid using ActiveWidget grid - www.activewidgets.com

Description

All HTMLgrid functions do use the component ActiveWidget grid. Basically, we use this component to display data, so the functions export a data.frame. Data could be stored within the HTML file (HTMLgrid_inline) or in an external raw text file which would be required asynchronously (HTMLgrid).

Usage

HTMLgrid(x, file = HTMLGetFile(), append = TRUE,
includeref = FALSE, align = "center", digits = getOption("R2HTML.format.digits"),
nsmall = getOption("R2HTML.format.nsmall"),
big.mark = getOption("R2HTML.format.big.mark"),
big.interval = getOption("R2HTML.format.big.interval"),
decimal.mark = getOption("R2HTML.format.decimal.mark"),
asDF = TRUE, browse = FALSE, classes = NULL, showimages = TRUE)
HTMLgrid_inline(x,file = HTMLGetFile(), append=TRUE,
includeref=FALSE, align="center", digits=getOption("R2HTML.format.digits"),
nsmall = getOption("R2HTML.format.nsmall"),
big.mark = getOption("R2HTML.format.big.mark"),
big.interval = getOption("R2HTML.format.big.interval"),
decimal.mark = getOption("R2HTML.format.decimal.mark"),
asDF=TRUE,browse=FALSE, classes=sapply(x,class), showimages=TRUE)
HTMLgrid_summary(x,file=NULL,append=TRUE,  digits=getOption("R2HTML.format.digits"),
nsmall = getOption("R2HTML.format.nsmall"),
big.mark = getOption("R2HTML.format.big.mark"),
big.interval = getOption("R2HTML.format.big.interval"),
decimal.mark = getOption("R2HTML.format.decimal.mark"), browse=FALSE)
HTMLgrid_references(file=)

Arguments

x

a data.frame

file

target HTLM output - see details below

append

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

includeref

logical. If 'TRUE', references to necessary CSS+Javascript files will be includes. See details.

align

"center", "left" or "right"

digits

number of digits to use for rounding

nsmall

number of digits which will always appear to the right of the decimal point in formatting real/complex numbers in non-scientific formats. Allowed values '0 <= nsmall <= 20'

big.mark

character; if not empty used as mark between every 'big.interval' decimals before (hence 'big') the decimal point

big.interval

see 'big.mark' above; defaults to 3

decimal.mark

the character used to indicate the numeric decimal point

asDF

logical. If 'TRUE', output will be considered as a data frame (which also mean by default we show icons for data type)

browse

logical. If 'TRUE', the output file will directly be called within a browser.

classes

vector of classes for the object. If NULL, the default, will be created using real classes. Could be used to bypass defaukt formatting associated with each class

showimages

logicial. Display or not little icons in columns headers

Details

Those exportation methods require severall external files, including the runtime version of ActiveWidgets grid. To include the necessary references, you can use HTMLgrid_references. Be careful: if you intend to put multiple grids on a same output, the references has to be present only once in the output. If you set the file argument to NULL, a new temp file will be created.

Value

file

target HTLM output

Note

Presentation relies on pure CSS + Javascript. It may be possible than future upgrade change the presentation of grids created with this version.

Author(s)

Eric Lecoutre

References

ActiveWidgets Grid 1.0 - http://www.activewidgets.com

Examples

    data(iris)
    fic <- HTMLInitFile(useGrid=TRUE,useLaTeX=FALSE)
    fic <- HTMLgrid_inline(iris,file=fic)
    cat("\n Browse file 'fic':",fic)
    ## Not run: browseURL(fic)

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/HTMLgrid.Rd_%03d_medium.png", width=480, height=480)
> ### Name: HTMLgrid
> ### Title: Creates a HTML grid using ActiveWidget grid -
> ###   www.activewidgets.com
> ### Aliases: HTMLgrid HTMLgrid_inline HTMLgrid_references HTMLgrid_summary
> ### Keywords: datasets IO
> 
> ### ** Examples
> 
>     data(iris)
>     fic <- HTMLInitFile(useGrid=TRUE,useLaTeX=FALSE)
>     fic <- HTMLgrid_inline(iris,file=fic)
>     cat("\n Browse file 'fic':",fic)

 Browse file 'fic': /tmp/Rtmp9NWySO/index.html>     ## Not run: browseURL(fic)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>