Last data update: 2014.03.03

R: Summarize selected experiments.
summarizeExperimentsR Documentation

Summarize selected experiments.

Description

A data.frame is returned that contains summary information about the selected experiments. The data.frame is constructed by building the columns “prob, <prob.pars>, algo, <algo.pars>, repl”, rbind.fill is used to connect the rows, so if some parameters do not appear in some experiments, they will be set to NA. Now only the columns in show will be selected, how many of such experiments exist will be counted in a new column “.count”.

Usage

summarizeExperiments(reg, ids, show = c("prob", "algo"))

Arguments

reg

[ExperimentRegistry]
Registry.

ids

[integer]
Selected experiments. Default is all experiments.

show

[character]
Should detailed information for each single experiment be printed? Default is c("prob", "algo").

Value

[data.frame].

Examples

reg = makeExperimentRegistry("summarizeExperiments", seed = 123, file.dir = tempfile())
p1 = addProblem(reg, "p1", static = 1)
a1 = addAlgorithm(reg, id = "a1", fun = function(static, dynamic, alpha, beta) 1)
a2 = addAlgorithm(reg, id = "a2", fun = function(static, dynamic, alpha, gamma) 2)
ad1 = makeDesign(a1, exhaustive = list(alpha = 1:2, beta = 1:2))
ad2 = makeDesign(a2, exhaustive = list(alpha = 1:2, gamma = 7:8))
addExperiments(reg, algo.designs = list(ad1, ad2), repls = 2)
print(summarizeExperiments(reg))
print(summarizeExperiments(reg, show = c("prob", "algo", "alpha", "gamma")))

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(BatchExperiments)
Loading required package: BatchJobs
Loading required package: BBmisc
Sourcing configuration file: '/home/ddbj/local/lib64/R/library/BatchJobs/etc/BatchJobs_global_config.R'
BatchJobs configuration:
  cluster functions: Interactive
  mail.from: 
  mail.to: 
  mail.start: none
  mail.done: none
  mail.error: none
  default.resources: 
  debug: FALSE
  raise.warnings: FALSE
  staged.queries: TRUE
  max.concurrent.jobs: Inf
  fs.timeout: NA

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/BatchExperiments/summarizeExperiments.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summarizeExperiments
> ### Title: Summarize selected experiments.
> ### Aliases: summarizeExperiments
> 
> ### ** Examples
> 
> reg = makeExperimentRegistry("summarizeExperiments", seed = 123, file.dir = tempfile())
Creating dir: /tmp/RtmpUcBmNt/file39b8bde3f70
Saving registry: /tmp/RtmpUcBmNt/file39b8bde3f70/registry.RData
> p1 = addProblem(reg, "p1", static = 1)
Writing problem files: /tmp/RtmpUcBmNt/file39b8bde3f70/problems/p1_static.RData, /tmp/RtmpUcBmNt/file39b8bde3f70/problems/p1_dynamic.RData
> a1 = addAlgorithm(reg, id = "a1", fun = function(static, dynamic, alpha, beta) 1)
Writing algorithm file: /tmp/RtmpUcBmNt/file39b8bde3f70/algorithms/a1.RData
> a2 = addAlgorithm(reg, id = "a2", fun = function(static, dynamic, alpha, gamma) 2)
Writing algorithm file: /tmp/RtmpUcBmNt/file39b8bde3f70/algorithms/a2.RData
> ad1 = makeDesign(a1, exhaustive = list(alpha = 1:2, beta = 1:2))
> ad2 = makeDesign(a2, exhaustive = list(alpha = 1:2, gamma = 7:8))
> addExperiments(reg, algo.designs = list(ad1, ad2), repls = 2)
Adding 8 experiments / 16 jobs to DB.
> print(summarizeExperiments(reg))
  prob algo .count
1   p1   a1      8
2   p1   a2      8
> print(summarizeExperiments(reg, show = c("prob", "algo", "alpha", "gamma")))
  prob algo alpha gamma .count
1   p1   a1     1    NA      4
2   p1   a1     2    NA      4
3   p1   a2     1     7      2
4   p1   a2     1     8      2
5   p1   a2     2     7      2
6   p1   a2     2     8      2
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>