simpleHtmlReport: simple html report

Description Usage Arguments Details Value Examples

View source: R/EasyHTMLReport.R

Description

send a simple email report from data.frame

Usage

1
2
simpleHtmlReport(report.name, mail.from, mail.to, subject, report.data,
                 rmd.header=simpleRmdHeader,rmd.footer=simpleRmdFooter)

Arguments

report.name

report name

mail.from

mail from

mail.to

mail to

subject

mail subject

report.data

report data list.

rmd.header

Generating function in the header of the Rmd

rmd.footer

Generating function in the footer of the Rmd

Details

report.data can specify the following:

data

data.frame

id

Column name that is the ID. default is id

variable

Column name that is the variable. default is variable

value

Column name that is the value. default is value

graph.text

Text to be inserted just before the graph. default is "Graph:"

fig.width

figure width. default is 8

fig.height

figure height. default is 4

position

graph position.

graph.rmd.func

Generating function in the graph of the Rmd. default is simpleRmdGraphDateLine

table.text

Text to be inserted just before the table. default is "Table:"

table.rmd.func

Generating function in the graph of the Rmd. default is simpleRmdXtableTail

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Not run: 
A <- data.frame(id=c("2013-08-01","2013-08-02","2013-08-03",
                  "2013-08-04","2013-08-05"),
                variable="A",
                value=c(100,123,130,125,140))
B <- data.frame(id=c("2013-08-01","2013-08-02","2013-08-03",
                  "2013-08-04","2013-08-05"),
                variable="B",
                value=c(90,100,120,140,110))
C <- data.frame(id=c("2013-08-01","2013-08-02","2013-08-03",
                  "2013-08-04","2013-08-05"),
                variable="C",
                value=c(150,130,150,160,150))

data1 <- rbind(A,B,C)

set.seed(2)
data2 <- data1
data2$value <- data2$value*100 + rnorm(nrow(data2),0,100)

set.seed(4)
data3 <- data1
data3$value <- data2$value*100 + rnorm(nrow(data2),0,50)

simpleHtmlReport("Simple HTML Report",
                 "yokkuns@localhost",
                 "yohei0511@gmail.com",
                 "simpleHtmlReport Test",
                 report.data=list(
                     "Report1" = list(data=data1),
                     "Report2" = list(data=data2),
                     "Report3" = list(data=data3)
                 ))

## End(Not run)

EasyHTMLReport documentation built on May 1, 2019, 7:58 p.m.