Commit 9e52e3ff authored by illo's avatar illo
Browse files

update documentation and description

parent 72ff7a07
Pipeline #239588976 passed with stage
in 19 seconds
Package: mongopipe
Title: Translate R Code into MongoDB Aggregation Pipelines
Title: Query MongoDB Documents with R
Version: 0.1.0
Authors@R:
person(given = "Oliver",
family = "Haag",
role = c("aut", "cre"),
email = "oliver_haag@e.mail.de")
Maintainer: 'Oliver Haag <oliver_haag@e.mail.de>'
URL: https://gitlab.com/rpkgs/mongopipe
Maintainer: Oliver Haag <oliver_haag@e.mail.de>
Description: Translate R code into MongoDB aggregation pipelines.
URL: https://rpkgs.gitlab.io/mongopipe, https://gitlab.com/rpkgs/mongopipe
BugReports: https://gitlab.com/rpkgs/mongopipe/-/issues
License: MIT + file LICENSE
Suggests:
testthat (>= 3.0.0),
......
......@@ -15,6 +15,8 @@
#' jsonlite::toJSON(cond)
#' }
#'
#' @return Return a list for using in mongopipe.
#'
#' @export
condition <- function(test, yes, no) {
query <- check_query(list("if"=test, "then"=yes, "else"=no))
......
......@@ -2,8 +2,11 @@
#'
#' These functions translate R code to json readably by Mongodb.
#'
#' @param x Object of class `mongo`
#' @param x Object of class `mongopipe`
#' @param ... list object
#'
#' @return Object of type mongopipe.
#'
#' @export
match <- function(x, ...) {
UseMethod("match")
......
......@@ -13,6 +13,8 @@ mongopipe <- function() {
#' @param type Name of the stage.
#' @param ... query
#'
#' @return Object of type mongopipe.
#'
#' @export
add_stage <- function(x, ...) {
UseMethod("add_stage")
......
......@@ -29,7 +29,7 @@ You can install the released version of mongopipe from [CRAN](https://CRAN.R-pro
# install.packages("mongopipe") # Not possible yet
```
-->
You can install the development version of mongopipe with on [gitlab](https://gitlab.com/rpkgs/mongopipe) with:
You can install the development version of mongopipe on [gitlab](https://gitlab.com/rpkgs/mongopipe) with:
``` r
remotes::install_gitlab("illoRocks/mongopipe")
......
......@@ -23,7 +23,7 @@ You can install the released version of mongopipe from [CRAN](https://CRAN.R-pro
```
-->
You can install the development version of mongopipe with on
You can install the development version of mongopipe on
[gitlab](https://gitlab.com/rpkgs/mongopipe) with:
``` r
......
# create documentation
devtools::document()
# check package
devtools::check()
# Checking for good practice
goodpractice::gp()
# update docs
pkgdown::build_site()
......@@ -10,5 +16,5 @@ rhub::check_for_cran()
# Check for win-builder
devtools::check_win_devel()
# Checking for good practice
goodpractice::gp()
# set version
usethis::use_version("patch")
......@@ -71,7 +71,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -79,7 +79,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -88,7 +88,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......
......@@ -71,7 +71,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -79,7 +79,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -88,7 +88,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......
......@@ -71,7 +71,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -79,7 +79,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -88,7 +88,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......
......@@ -71,7 +71,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -79,7 +79,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -88,7 +88,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......
......@@ -5,14 +5,14 @@
<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>Translate R code into Mongo aggregation pipelines • mongopipe</title>
<title>Query MongoDB Documents with R • mongopipe</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="Translate R code into Mongo aggregation pipelines">
<meta property="og:description" content="Translate R code into Mongo aggregation pipelines.">
<script src="pkgdown.js"></script><meta property="og:title" content="Query MongoDB Documents with R">
<meta property="og:description" content="Translate R code into MongoDB aggregation pipelines.">
<!-- 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>
......@@ -31,7 +31,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -39,7 +39,7 @@
<ul class="nav navbar-nav">
<li>
<a href="index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -47,7 +47,14 @@
<a href="reference/index.html">Reference</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right"></ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
<!--/.nav-collapse -->
</div>
......@@ -68,40 +75,32 @@
<div id="installation" class="section level2">
<h2 class="hasAnchor">
<a href="#installation" class="anchor"></a>Installation</h2>
<p>You can install the released version of mongopipe from <a href="https://CRAN.R-project.org">CRAN</a> with:</p>
<!--
You can install the released version of mongopipe from [CRAN](https://CRAN.R-project.org) with:
``` r
# install.packages("mongopipe") # Not possible yet
```
-->
<p>You can install the development version of mongopipe on <a href="https://gitlab.com/rpkgs/mongopipe">gitlab</a> with:</p>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html">install.packages</a></span><span class="op">(</span><span class="st">"mongopipe"</span><span class="op">)</span>
<span class="co"># or</span>
<span class="co"># TODO: publish it on gitlab and insert address</span>
<span class="co"># remotes::remotes("gitlab")</span></code></pre></div>
<code class="sourceCode R"><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_gitlab.html">install_gitlab</a></span><span class="op">(</span><span class="st">"illoRocks/mongopipe"</span><span class="op">)</span></code></pre></div>
</div>
<div id="example" class="section level2">
<h2 class="hasAnchor">
<a href="#example" class="anchor"></a>Example</h2>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va">mongopipe</span><span class="op">)</span>
<code class="sourceCode R"><span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://gitlab.com/rpkgs/mongopipe">mongopipe</a></span><span class="op">)</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="https://github.com/jeroen/mongolite/">mongolite</a></span><span class="op">)</span>
<span class="kw"><a href="https://rdrr.io/r/base/library.html">library</a></span><span class="op">(</span><span class="va"><a href="http://github.com/hadley/nycflights13">nycflights13</a></span><span class="op">)</span>
<span class="va">m_flights</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/mongolite/man/mongo.html">mongo</a></span><span class="op">(</span><span class="st">"test_flights"</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
<span class="va">m_airports</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/pkg/mongolite/man/mongo.html">mongo</a></span><span class="op">(</span><span class="st">"test_airports"</span>, verbose <span class="op">=</span> <span class="cn">FALSE</span><span class="op">)</span>
<span class="va">m_flights</span><span class="op">$</span><span class="fu">drop</span><span class="op">(</span><span class="op">)</span>
<span class="va">m_flights</span><span class="op">$</span><span class="fu">insert</span><span class="op">(</span><span class="va">flights</span><span class="op">)</span>
<span class="co">#&gt; List of 5</span>
<span class="co">#&gt; $ nInserted : num 336776</span>
<span class="co">#&gt; $ nMatched : num 0</span>
<span class="co">#&gt; $ nRemoved : num 0</span>
<span class="co">#&gt; $ nUpserted : num 0</span>
<span class="co">#&gt; $ writeErrors: list()</span>
<span class="va">m_airports</span><span class="op">$</span><span class="fu">drop</span><span class="op">(</span><span class="op">)</span>
<span class="va">m_airports</span><span class="op">$</span><span class="fu">insert</span><span class="op">(</span><span class="va">airports</span><span class="op">)</span>
<span class="co">#&gt; List of 5</span>
<span class="co">#&gt; $ nInserted : num 1458</span>
<span class="co">#&gt; $ nMatched : num 0</span>
<span class="co">#&gt; $ nRemoved : num 0</span>
<span class="co">#&gt; $ nUpserted : num 0</span>
<span class="co">#&gt; $ writeErrors: list()</span>
<span class="kw">if</span><span class="op">(</span><span class="op">!</span><span class="va">m_flights</span><span class="op">$</span><span class="fu">count</span><span class="op">(</span><span class="op">)</span><span class="op">)</span>
<span class="va">m_flights</span><span class="op">$</span><span class="fu">insert</span><span class="op">(</span><span class="va">flights</span><span class="op">)</span>
<span class="kw">if</span><span class="op">(</span><span class="op">!</span><span class="va">m_airports</span><span class="op">$</span><span class="fu">count</span><span class="op">(</span><span class="op">)</span><span class="op">)</span>
<span class="va">m_airports</span><span class="op">$</span><span class="fu">insert</span><span class="op">(</span><span class="va">airports</span><span class="op">)</span>
<span class="va">result</span> <span class="op">&lt;-</span> <span class="fu"><a href="reference/mongopipe.html">mongopipe</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="reference/match.html">match</a></span><span class="op">(</span>faa<span class="op">=</span><span class="st">"ABQ"</span><span class="op">)</span> <span class="op">%&gt;%</span>
......@@ -112,12 +111,12 @@
<span class="fu"><a href="https://rdrr.io/r/utils/head.html">head</a></span><span class="op">(</span><span class="va">result</span><span class="op">)</span>
<span class="co">#&gt; _id air_time dep_delay origin</span>
<span class="co">#&gt; 1 5fe1f43f0d014e38242e1401 230 -6 JFK</span>
<span class="co">#&gt; 2 5fe1f43f0d014e38242e1401 238 9 JFK</span>
<span class="co">#&gt; 3 5fe1f43f0d014e38242e1401 251 -6 JFK</span>
<span class="co">#&gt; 4 5fe1f43f0d014e38242e1401 257 16 JFK</span>
<span class="co">#&gt; 5 5fe1f43f0d014e38242e1401 242 0 JFK</span>
<span class="co">#&gt; 6 5fe1f43f0d014e38242e1401 240 -2 JFK</span></code></pre></div>
<span class="co">#&gt; 1 5fe23ddb5a72ab3dc0076731 230 -6 JFK</span>
<span class="co">#&gt; 2 5fe23ddb5a72ab3dc0076731 238 9 JFK</span>
<span class="co">#&gt; 3 5fe23ddb5a72ab3dc0076731 251 -6 JFK</span>
<span class="co">#&gt; 4 5fe23ddb5a72ab3dc0076731 257 16 JFK</span>
<span class="co">#&gt; 5 5fe23ddb5a72ab3dc0076731 242 0 JFK</span>
<span class="co">#&gt; 6 5fe23ddb5a72ab3dc0076731 240 -2 JFK</span></code></pre></div>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span class="va">pipe</span> <span class="op">&lt;-</span> <span class="fu"><a href="reference/mongopipe.html">mongopipe</a></span><span class="op">(</span><span class="op">)</span> <span class="op">%&gt;%</span>
<span class="fu"><a href="reference/match.html">match</a></span><span class="op">(</span>faa<span class="op">=</span><span class="st">"ABQ"</span><span class="op">)</span> <span class="op">%&gt;%</span>
......@@ -156,7 +155,16 @@
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<div class="license">
<div class="links">
<h2>Links</h2>
<ul class="list-unstyled">
<li>Browse source code at <br><a href="https://gitlab.com/rpkgs/mongopipe/">https://​gitlab.com/​rpkgs/​mongopipe/​</a>
</li>
<li>Report a bug at <br><a href="https://gitlab.com/rpkgs/mongopipe/-/issues">https://​gitlab.com/​rpkgs/​mongopipe/​-/​issues</a>
</li>
</ul>
</div>
<div class="license">
<h2>License</h2>
<ul class="list-unstyled">
<li><a href="LICENSE.html">Full license</a></li>
......
......@@ -2,5 +2,5 @@ pandoc: 2.7.3
pkgdown: 1.6.1
pkgdown_sha: ~
articles: {}
last_built: 2020-12-22T14:42Z
last_built: 2021-01-09T20:19Z
......@@ -72,7 +72,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -80,7 +80,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -89,7 +89,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......@@ -104,7 +109,7 @@
<div class="col-md-9 contents">
<div class="page-header">
<h1>Create or append a mongo aggregation stage</h1>
<small class="dont-index">Source: <a href='https://gitlab.com/rpkgs/mongopipe/blob/master/R/pipeline.R'><code>R/pipeline.R</code></a></small>
<div class="hidden name"><code>add_stage.Rd</code></div>
</div>
......@@ -137,6 +142,9 @@
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Object of type mongopipe.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
......
......@@ -40,7 +40,8 @@
<meta property="og:title" content="Conditional expression ($cond) — condition" />
<meta property="og:description" content="Evaluates a boolean expression to return one of the two specified return expressions." />
<meta property="og:description" content="Evaluates a boolean expression to return one
of the two specified return expressions." />
......@@ -72,7 +73,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -80,7 +81,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -89,7 +90,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......@@ -104,12 +110,13 @@
<div class="col-md-9 contents">
<div class="page-header">
<h1>Conditional expression ($cond)</h1>
<small class="dont-index">Source: <a href='https://gitlab.com/rpkgs/mongopipe/blob/master/R/aggregation_operators.R'><code>R/aggregation_operators.R</code></a></small>
<div class="hidden name"><code>condition.Rd</code></div>
</div>
<div class="ref-description">
<p>Evaluates a boolean expression to return one of the two specified return expressions.</p>
<p>Evaluates a boolean expression to return one
of the two specified return expressions.</p>
</div>
<pre class="usage"><span class='fu'>condition</span><span class='op'>(</span><span class='va'>test</span>, <span class='va'>yes</span>, <span class='va'>no</span><span class='op'>)</span></pre>
......@@ -131,10 +138,15 @@
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Return a list for using in mongopipe.</p>
<h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
<pre class="examples"><div class='input'><span class='kw'>if</span> <span class='op'>(</span><span class='cn'>FALSE</span><span class='op'>)</span> <span class='op'>{</span>
<span class='va'>cond</span> <span class='op'>&lt;-</span> <span class='fu'>condition</span><span class='op'>(</span>test <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"$isArray"</span><span class='op'>=</span><span class='st'>"$chart"</span><span class='op'>)</span>, yes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"$size"</span><span class='op'>=</span><span class='st'>"$chart"</span><span class='op'>)</span>, no <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>
<span class='va'>cond</span> <span class='op'>&lt;-</span> <span class='fu'>condition</span><span class='op'>(</span>test <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"$isArray"</span><span class='op'>=</span><span class='st'>"$chart"</span><span class='op'>)</span>,
yes <span class='op'>=</span> <span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span><span class='op'>(</span><span class='st'>"$size"</span><span class='op'>=</span><span class='st'>"$chart"</span><span class='op'>)</span>,
no <span class='op'>=</span> <span class='fl'>0</span><span class='op'>)</span>
<span class='fu'>jsonlite</span><span class='fu'>::</span><span class='fu'><a href='https://rdrr.io/pkg/jsonlite/man/fromJSON.html'>toJSON</a></span><span class='op'>(</span><span class='va'>cond</span><span class='op'>)</span>
<span class='op'>}</span>
......
......@@ -71,7 +71,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -79,7 +79,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -88,7 +88,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......
......@@ -40,7 +40,7 @@
<meta property="og:title" content="Pipeline Stages — match" />
<meta property="og:description" content="These functions translate R code to json readably by mongodb." />
<meta property="og:description" content="These functions translate R code to json readably by Mongodb." />
......@@ -72,7 +72,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -80,7 +80,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>
</a>
</li>
......@@ -89,7 +89,12 @@
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="https://gitlab.com/rpkgs/mongopipe/">
<span class="fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
......@@ -104,12 +109,12 @@
<div class="col-md-9 contents">
<div class="page-header">
<h1>Pipeline Stages</h1>
<small class="dont-index">Source: <a href='https://gitlab.com/rpkgs/mongopipe/blob/master/R/aggregation_stages.R'><code>R/aggregation_stages.R</code></a></small>
<div class="hidden name"><code>match.Rd</code></div>
</div>
<div class="ref-description">
<p>These functions translate R code to json readably by mongodb.</p>
<p>These functions translate R code to json readably by Mongodb.</p>
</div>
<pre class="usage"><span class='fu'>match</span><span class='op'>(</span><span class='va'>x</span>, <span class='va'>...</span><span class='op'>)</span>
......@@ -147,7 +152,7 @@
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>x</th>
<td><p>Object of class mongo</p></td>
<td><p>Object of class <code>mongopipe</code></p></td>
</tr>
<tr>
<th>...</th>
......@@ -179,6 +184,9 @@
</tr>
</table>
<h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
<p>Object of type mongopipe.</p>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
......
......@@ -72,7 +72,7 @@
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">mongopipe</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.0.0.9000</span>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.1.0</span>
</span>
</div>
......@@ -80,7 +80,7 @@
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fas fa fas fa-home fa-lg"></span>
<span class="fas fa-home fa-lg"></span>