-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport_TI.R
64 lines (50 loc) · 1.78 KB
/
report_TI.R
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Activate the command line arguments
args <- commandArgs(TRUE)
# Imports
library(tools)
library(exreport)
# From the name of this metric, obtain
# the path where the results are stored
metricPath <- 'Resultados/time.csv'
# From the name of this metric, obtain the
# path where the report will be stored
reportPath <- 'Resultados/'
# Read the DataFrame with the results for this metric
ds <- read.csv(metricPath, row.names=1, check.names=FALSE)
# Set the name of the column for the methods
ds <- cbind(rownames(ds), ds)
colnames(ds)[1] <- "method"
# Initialize the report
r <- exreport("Report")
# Create the experiment from this metric
e <- expCreateFromTable(data=ds,
output='time',
name="Report",
respectOrder=FALSE)
# Ensure that the data is numeric
e$data[['time']] <- as.numeric(e$data[['time']])
# Instantiate the experiments
ei <- expInstantiate(e)
# Obtain the experiment table for this metric
tabexp <- tabularExpSummary(exp=ei,
outputs='time',
boldfaceColumns='min',
format="f", digits=5,
rowsAsMethod=TRUE)
# Obtain the experiment plots for this metric
plotexp <- plotExpSummary(exp=ei,
output='time',
columns=5,
freeScale=TRUE)
# Add the experiment table and plots to the report
r <- exreportAdd(r, tabexp)
r <- exreportAdd(r, plotexp)
# Execute the pairwise test
testm <- testPaired(ei, 'time', rankOrder='min', alpha=0.05)
r <- exreportAdd(r, testm)
# Generate the HTML report
exreportRender(r,
destination=reportPath,
target="html",
safeMode=FALSE,
visualize=FALSE)