<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>ExperimentRegistry Constructor — makeExperimentRegistry • batchtools</title>


<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha256-bZLfwXAP04zRMK2BjiO8iu9pf4FbLqX6zitd+tIvLhE=" crossorigin="anonymous" />

<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>

<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>

<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />

<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>

<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>

<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>




<meta property="og:title" content="ExperimentRegistry Constructor — makeExperimentRegistry" />
<meta property="og:description" content="makeExperimentRegistry constructs a special Registry which
is suitable for the definition of large scale computer experiments.
Each experiments consists of a Problem and an Algorithm.
These can be parametrized with addExperiments to actually define computational
jobs." />




<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->



  </head>

  <body data-spy="scroll" data-target="#toc">
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <span class="navbar-brand">
        <a class="navbar-link" href="../index.html">batchtools</a>
        <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.9.14</span>
      </span>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../index.html">
    <span class="fas fa fas fa-home fa-lg"></span>
     
  </a>
</li>
<li>
  <a href="../articles/batchtools.html">Get started</a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
<li>
  <a href="../news/index.html">Changelog</a>
</li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="https://github.com/mllg/batchtools/">
    <span class="fab fa fab fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
      
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      

      </header>

<div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>ExperimentRegistry Constructor</h1>
    <small class="dont-index">Source: <a href='https://github.com/mllg/batchtools/blob/master/R/ExperimentRegistry.R'><code>R/ExperimentRegistry.R</code></a></small>
    <div class="hidden name"><code>makeExperimentRegistry.Rd</code></div>
    </div>

    <div class="ref-description">
    <p><code>makeExperimentRegistry</code> constructs a special <code><a href='makeRegistry.html'>Registry</a></code> which
is suitable for the definition of large scale computer experiments.</p>
<p>Each experiments consists of a <code><a href='addProblem.html'>Problem</a></code> and an <code><a href='addAlgorithm.html'>Algorithm</a></code>.
These can be parametrized with <code><a href='addExperiments.html'>addExperiments</a></code> to actually define computational
jobs.</p>
    </div>

    <pre class="usage"><span class='fu'>makeExperimentRegistry</span><span class='op'>(</span>
  file.dir <span class='op'>=</span> <span class='st'>"registry"</span>,
  work.dir <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/getwd.html'>getwd</a></span><span class='op'>(</span><span class='op'>)</span>,
  conf.file <span class='op'>=</span> <span class='fu'><a href='findConfFile.html'>findConfFile</a></span><span class='op'>(</span><span class='op'>)</span>,
  packages <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/character.html'>character</a></span><span class='op'>(</span><span class='fl'>0L</span><span class='op'>)</span>,
  namespaces <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/character.html'>character</a></span><span class='op'>(</span><span class='fl'>0L</span><span class='op'>)</span>,
  source <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/character.html'>character</a></span><span class='op'>(</span><span class='fl'>0L</span><span class='op'>)</span>,
  load <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/character.html'>character</a></span><span class='op'>(</span><span class='fl'>0L</span><span class='op'>)</span>,
  seed <span class='op'>=</span> <span class='cn'>NULL</span>,
  make.default <span class='op'>=</span> <span class='cn'>TRUE</span>
<span class='op'>)</span></pre>

    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>file.dir</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code>]<br />
  Path where all files of the registry are saved.
  Default is directory &#8220;registry&#8221; in the current working directory.
  The provided path will get normalized unless it is given relative to the home directory
  (i.e., starting with &#8220;~&#8221;). Note that some templates do not handle relative paths well.</p>
<p>If you pass <code>NA</code>, a temporary directory will be used.
  This way, you can create disposable registries for <code><a href='btlapply.html'>btlapply</a></code> or examples.
  By default, the temporary directory <code><a href='https://rdrr.io/r/base/tempfile.html'>tempdir</a>()</code> will be used.
  If you want to use another directory, e.g. a directory which is shared between nodes,
  you can set it in your configuration file by setting the variable <code>temp.dir</code>.</p></td>
    </tr>
    <tr>
      <th>work.dir</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code>]<br />
  Working directory for R process for running jobs.
  Defaults to the working directory currently set during Registry construction (see <code><a href='https://rdrr.io/r/base/getwd.html'>getwd</a></code>).
  <code>loadRegistry</code> uses the stored <code>work.dir</code>, but you may also explicitly overwrite it,
  e.g., after switching to another system.</p>
<p>The provided path will get normalized unless it is given relative to the home directory
  (i.e., starting with &#8220;~&#8221;). Note that some templates do not handle relative paths well.</p></td>
    </tr>
    <tr>
      <th>conf.file</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/character.html'>character(1)</a></code>]<br />
  Path to a configuration file which is sourced while the registry is created.
  In the configuration file you can define how <span class="pkg">batchtools</span> interacts with the system via <code><a href='makeClusterFunctions.html'>ClusterFunctions</a></code>.
  Separating the configuration of the underlying host system from the R code allows to easily move computation to another site.</p>
<p>The file lookup is implemented in the internal (but exported) function <code>findConfFile</code> which returns the first file found of the following candidates:</p><ol>
<li><p>File &#8220;batchtools.conf.R&#8221; in the path specified by the environment variable &#8220;R_BATCHTOOLS_SEARCH_PATH&#8221;.</p></li>
<li><p>File &#8220;batchtools.conf.R&#8221; in the current working directory.</p></li>
<li><p>File &#8220;config.R&#8221; in the user configuration directory as reported by <code><a href='https://rdrr.io/pkg/rappdirs/man/user_data_dir.html'>rappdirs::user_config_dir("batchtools", expand = FALSE)</a></code> (depending on OS, e.g., on linux this usually resolves to &#8220;~/.config/batchtools/config.R&#8221;).</p></li>
<li><p>&#8220;.batchtools.conf.R&#8221; in the home directory (&#8220;~&#8221;).</p></li>
<li><p>&#8220;config.R&#8221; in the site config directory as reported by <code><a href='https://rdrr.io/pkg/rappdirs/man/site_data_dir.html'>rappdirs::site_config_dir("batchtools")</a></code> (depending on OS). This file can be used for admins to set sane defaults for a computation site.</p></li>
</ol><p>Set to <code>NA</code> if you want to suppress reading any configuration file.
  If a configuration file is found, it gets sourced inside the environment of the registry after the defaults for all variables are set.
  Therefore you can set and overwrite slots, e.g. <code>default.resources = list(walltime = 3600)</code> to set default resources or &#8220;max.concurrent.jobs&#8221; to
  limit the number of jobs allowed to run simultaneously on the system.</p></td>
    </tr>
    <tr>
      <th>packages</th>
      <td><p>[<code>character</code>]<br />
Packages that will always be loaded on each node.
Uses <code><a href='https://rdrr.io/r/base/library.html'>require</a></code> internally.
Default is <code><a href='https://rdrr.io/r/base/character.html'>character(0)</a></code>.</p></td>
    </tr>
    <tr>
      <th>namespaces</th>
      <td><p>[<code>character</code>]<br />
Same as <code>packages</code>, but the packages will not be attached.
Uses <code><a href='https://rdrr.io/r/base/ns-load.html'>requireNamespace</a></code> internally.
Default is <code><a href='https://rdrr.io/r/base/character.html'>character(0)</a></code>.</p></td>
    </tr>
    <tr>
      <th>source</th>
      <td><p>[<code>character</code>]<br />
Files which should be sourced on the slaves prior to executing a job.
Calls <code><a href='https://rdrr.io/r/base/sys.source.html'>sys.source</a></code> using the <code><a href='https://rdrr.io/r/base/environment.html'>.GlobalEnv</a></code>.</p></td>
    </tr>
    <tr>
      <th>load</th>
      <td><p>[<code>character</code>]<br />
Files which should be loaded on the slaves prior to executing a job.
Calls <code><a href='https://rdrr.io/r/base/load.html'>load</a></code> using the <code><a href='https://rdrr.io/r/base/environment.html'>.GlobalEnv</a></code>.</p></td>
    </tr>
    <tr>
      <th>seed</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/integer.html'>integer(1)</a></code>]<br />
Start seed for jobs. Each job uses the (<code>seed</code> + <code>job.id</code>) as seed.
Default is a random integer between 1 and 32768</p></td>
    </tr>
    <tr>
      <th>make.default</th>
      <td><p>[<code><a href='https://rdrr.io/r/base/logical.html'>logical(1)</a></code>]<br />
If set to <code>TRUE</code>, the created registry is saved inside the package
namespace and acts as default registry. You might want to switch this
off if you work with multiple registries simultaneously.
Default is <code>TRUE</code>.</p></td>
    </tr>
    </table>

    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>[<code>ExperimentRegistry</code>].</p>

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples"><div class='input'> <span class='fu'>batchtools</span><span class='fu'>:::</span><span class='fu'>example_push_temp</span><span class='op'>(</span><span class='fl'>1</span><span class='op'>)</span> 
<span class='va'>tmp</span> <span class='op'>=</span> <span class='fu'>makeExperimentRegistry</span><span class='op'>(</span>file.dir <span class='op'>=</span> <span class='cn'>NA</span>, make.default <span class='op'>=</span> <span class='cn'>FALSE</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>No readable configuration file found</span></div><div class='output co'>#&gt; <span class='message'>Created registry in '/tmp/batchtools-example/reg' using cluster functions 'Interactive'</span></div><div class='input'>
<span class='co'># Definde one problem, two algorithms and add them with some parameters:</span>
<span class='fu'><a href='addProblem.html'>addProblem</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span>, <span class='st'>"p1"</span>,
  fun <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>job</span>, <span class='va'>data</span>, <span class='va'>n</span>, <span class='va'>mean</span>, <span class='va'>sd</span>, <span class='va'>...</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/stats/Normal.html'>rnorm</a></span><span class='op'>(</span><span class='va'>n</span>, mean <span class='op'>=</span> <span class='va'>mean</span>, sd <span class='op'>=</span> <span class='va'>sd</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Adding problem 'p1'</span></div><div class='input'><span class='fu'><a href='addAlgorithm.html'>addAlgorithm</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span>, <span class='st'>"a1"</span>, fun <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>job</span>, <span class='va'>data</span>, <span class='va'>instance</span>, <span class='va'>...</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/mean.html'>mean</a></span><span class='op'>(</span><span class='va'>instance</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Adding algorithm 'a1'</span></div><div class='input'><span class='fu'><a href='addAlgorithm.html'>addAlgorithm</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span>, <span class='st'>"a2"</span>, fun <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>job</span>, <span class='va'>data</span>, <span class='va'>instance</span>, <span class='va'>...</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/stats/median.html'>median</a></span><span class='op'>(</span><span class='va'>instance</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Adding algorithm 'a2'</span></div><div class='input'><span class='va'>ids</span> <span class='op'>=</span> <span class='fu'><a href='addExperiments.html'>addExperiments</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span>, <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>p1 <span class='op'>=</span> <span class='fu'>data.table</span><span class='fu'>::</span><span class='fu'><a href='https://Rdatatable.gitlab.io/data.table/reference/J.html'>CJ</a></span><span class='op'>(</span>n <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='fl'>50</span>, <span class='fl'>100</span><span class='op'>)</span>, mean <span class='op'>=</span> <span class='op'>-</span><span class='fl'>2</span><span class='op'>:</span><span class='fl'>2</span>, sd <span class='op'>=</span> <span class='fl'>1</span><span class='op'>:</span><span class='fl'>4</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Adding 40 experiments ('p1'[40] x 'a1'[1] x repls[1]) ...</span></div><div class='output co'>#&gt; <span class='message'>Adding 40 experiments ('p1'[40] x 'a2'[1] x repls[1]) ...</span></div><div class='input'>
<span class='co'># Overview over defined experiments:</span>
<span class='va'>tmp</span><span class='op'>$</span><span class='va'>problems</span>
</div><div class='output co'>#&gt; [1] "p1"</div><div class='input'><span class='va'>tmp</span><span class='op'>$</span><span class='va'>algorithms</span>
</div><div class='output co'>#&gt; [1] "a1" "a2"</div><div class='input'><span class='fu'><a href='summarizeExperiments.html'>summarizeExperiments</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
</div><div class='output co'>#&gt;    problem algorithm .count
#&gt; 1:      p1        a1     40
#&gt; 2:      p1        a2     40</div><div class='input'><span class='fu'><a href='summarizeExperiments.html'>summarizeExperiments</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span>, by <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"problem"</span>, <span class='st'>"algorithm"</span>, <span class='st'>"n"</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt;    problem algorithm   n .count
#&gt; 1:      p1        a1  50     20
#&gt; 2:      p1        a1 100     20
#&gt; 3:      p1        a2  50     20
#&gt; 4:      p1        a2 100     20</div><div class='input'><span class='va'>ids</span> <span class='op'>=</span> <span class='fu'><a href='findJobs.html'>findExperiments</a></span><span class='op'>(</span>prob.pars <span class='op'>=</span> <span class='op'>(</span><span class='va'>n</span> <span class='op'>==</span> <span class='fl'>50</span><span class='op'>)</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
<span class='fu'><a href='https://rdrr.io/r/base/print.html'>print</a></span><span class='op'>(</span><span class='fu'><a href='unwrap.html'>unwrap</a></span><span class='op'>(</span><span class='fu'><a href='getJobTable.html'>getJobPars</a></span><span class='op'>(</span><span class='va'>ids</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span><span class='op'>)</span><span class='op'>)</span>
</div><div class='output co'>#&gt;     job.id problem algorithm  n mean sd
#&gt;  1:      1      p1        a1 50   -2  1
#&gt;  2:      2      p1        a1 50   -2  2
#&gt;  3:      3      p1        a1 50   -2  3
#&gt;  4:      4      p1        a1 50   -2  4
#&gt;  5:      5      p1        a1 50   -1  1
#&gt;  6:      6      p1        a1 50   -1  2
#&gt;  7:      7      p1        a1 50   -1  3
#&gt;  8:      8      p1        a1 50   -1  4
#&gt;  9:      9      p1        a1 50    0  1
#&gt; 10:     10      p1        a1 50    0  2
#&gt; 11:     11      p1        a1 50    0  3
#&gt; 12:     12      p1        a1 50    0  4
#&gt; 13:     13      p1        a1 50    1  1
#&gt; 14:     14      p1        a1 50    1  2
#&gt; 15:     15      p1        a1 50    1  3
#&gt; 16:     16      p1        a1 50    1  4
#&gt; 17:     17      p1        a1 50    2  1
#&gt; 18:     18      p1        a1 50    2  2
#&gt; 19:     19      p1        a1 50    2  3
#&gt; 20:     20      p1        a1 50    2  4
#&gt; 21:     41      p1        a2 50   -2  1
#&gt; 22:     42      p1        a2 50   -2  2
#&gt; 23:     43      p1        a2 50   -2  3
#&gt; 24:     44      p1        a2 50   -2  4
#&gt; 25:     45      p1        a2 50   -1  1
#&gt; 26:     46      p1        a2 50   -1  2
#&gt; 27:     47      p1        a2 50   -1  3
#&gt; 28:     48      p1        a2 50   -1  4
#&gt; 29:     49      p1        a2 50    0  1
#&gt; 30:     50      p1        a2 50    0  2
#&gt; 31:     51      p1        a2 50    0  3
#&gt; 32:     52      p1        a2 50    0  4
#&gt; 33:     53      p1        a2 50    1  1
#&gt; 34:     54      p1        a2 50    1  2
#&gt; 35:     55      p1        a2 50    1  3
#&gt; 36:     56      p1        a2 50    1  4
#&gt; 37:     57      p1        a2 50    2  1
#&gt; 38:     58      p1        a2 50    2  2
#&gt; 39:     59      p1        a2 50    2  3
#&gt; 40:     60      p1        a2 50    2  4
#&gt;     job.id problem algorithm  n mean sd</div><div class='input'>
<span class='co'># Submit jobs</span>
<span class='fu'><a href='submitJobs.html'>submitJobs</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
</div><div class='output co'>#&gt; <span class='message'>Submitting 80 jobs in 80 chunks using cluster functions 'Interactive' ...</span></div><div class='input'><span class='fu'><a href='waitForJobs.html'>waitForJobs</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
</div><div class='output co'>#&gt; [1] TRUE</div><div class='input'>
<span class='co'># Reduce the results of algorithm a1</span>
<span class='va'>ids.mean</span> <span class='op'>=</span> <span class='fu'><a href='findJobs.html'>findExperiments</a></span><span class='op'>(</span>algo.name <span class='op'>=</span> <span class='st'>"a1"</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
<span class='fu'><a href='reduceResults.html'>reduceResults</a></span><span class='op'>(</span><span class='va'>ids.mean</span>, fun <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>aggr</span>, <span class='va'>res</span>, <span class='va'>...</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='va'>aggr</span>, <span class='va'>res</span><span class='op'>)</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
</div><div class='output co'>#&gt;  [1] -2.00073766 -1.83988515 -2.19491590 -1.88744748 -1.16661898 -1.01586977
#&gt;  [7] -0.52913619 -0.63585094 -0.09331735  0.11880843  0.22120996  1.22939842
#&gt; [13]  1.00632897  1.26918801  2.11616673  1.81935795  1.90243597  1.93950861
#&gt; [19]  2.33621891  2.81313094 -1.95745534 -2.29431806 -1.82269005 -1.80889629
#&gt; [25] -0.91933173 -1.03820621 -0.95531362 -1.49309041  0.09203207  0.05360571
#&gt; [31]  0.04219920 -0.11534443  1.14488890  0.83504259  0.82821428  1.07835718
#&gt; [37]  2.06274541  2.28296085  2.26426388  1.74159301</div><div class='input'>
<span class='co'># Join info table with all results and calculate mean of results</span>
<span class='co'># grouped by n and algorithm</span>
<span class='va'>ids</span> <span class='op'>=</span> <span class='fu'><a href='findJobs.html'>findDone</a></span><span class='op'>(</span>reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span>
<span class='va'>pars</span> <span class='op'>=</span> <span class='fu'><a href='unwrap.html'>unwrap</a></span><span class='op'>(</span><span class='fu'><a href='getJobTable.html'>getJobPars</a></span><span class='op'>(</span><span class='va'>ids</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span><span class='op'>)</span>
<span class='va'>results</span> <span class='op'>=</span> <span class='fu'><a href='unwrap.html'>unwrap</a></span><span class='op'>(</span><span class='fu'><a href='reduceResultsList.html'>reduceResultsDataTable</a></span><span class='op'>(</span><span class='va'>ids</span>, fun <span class='op'>=</span> <span class='kw'>function</span><span class='op'>(</span><span class='va'>res</span><span class='op'>)</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>res <span class='op'>=</span> <span class='va'>res</span><span class='op'>)</span>, reg <span class='op'>=</span> <span class='va'>tmp</span><span class='op'>)</span><span class='op'>)</span>
<span class='va'>tab</span> <span class='op'>=</span> <span class='fu'><a href='JoinTables.html'>ljoin</a></span><span class='op'>(</span><span class='va'>pars</span>, <span class='va'>results</span><span class='op'>)</span>
<span class='va'>tab</span><span class='op'>[</span>, <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span>mres <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/mean.html'>mean</a></span><span class='op'>(</span><span class='va'>res</span><span class='op'>)</span><span class='op'>)</span>, by <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/c.html'>c</a></span><span class='op'>(</span><span class='st'>"n"</span>, <span class='st'>"algorithm"</span><span class='op'>)</span><span class='op'>]</span>
</div><div class='output co'>#&gt;      n algorithm        mres
#&gt; 1:  50        a1 0.270398674
#&gt; 2: 100        a1 0.001062847
#&gt; 3:  50        a2 0.068935673
#&gt; 4: 100        a2 0.020262158</div></pre>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
    <nav id="toc" data-toggle="toc" class="sticky-top">
      <h2 data-toc-skip>Contents</h2>
    </nav>
  </div>
</div>


      <footer>
      <div class="copyright">
  <p>Developed by Michel Lang, Bernd Bischl.</p>
</div>

<div class="pkgdown">
  <p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.6.1.</p>
</div>

      </footer>
   </div>

  


  </body>
</html>


