123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <!-- Generated by pkgdown: do not edit by hand -->
- <!DOCTYPE html>
- <html>
- <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>Containerize R Markdown Documents — lift • liftr</title>
- <!-- jquery -->
- <script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
- <!-- Bootstrap -->
- <link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/flatly/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
- <!-- Font Awesome icons -->
- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">
- <!-- pkgdown -->
- <link href="../pkgdown.css" rel="stylesheet">
- <script src="../jquery.sticky-kit.min.js"></script>
- <script src="../pkgdown.js"></script>
-
-
- <!-- mathjax -->
- <script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></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]-->
- <!-- Google analytics -->
- <script>
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
- })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
- ga('create', 'UA-65001771-1', 'auto');
- ga('send', 'pageview');
- </script>
- </head>
- <body>
- <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">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="../index.html">liftr</a>
- </div>
- <div id="navbar" class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- <li>
- <a href="../index.html">
- <span class="fa fa-home fa-lg"></span>
-
- </a>
- </li>
- <li>
- <a href="../reference/index.html">Reference</a>
- </li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
- Articles
-
- <span class="caret"></span>
- </a>
- <ul class="dropdown-menu" role="menu">
- <li>
- <a href="../articles/liftr-addins.html">RStudio Addins for liftr</a>
- </li>
- <li>
- <a href="../articles/liftr-intro.html">A Quick Introduction to liftr</a>
- </li>
- <li>
- <a href="../articles/liftr-tidyverse.html">Explore tidyverse with liftr</a>
- </li>
- </ul>
- </li>
- <li>
- <a href="../news/index.html">News</a>
- </li>
- </ul>
-
- <ul class="nav navbar-nav navbar-right">
- <li>
- <a href="https://github.com/road2stat/liftr">
- <span class="fa 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>Containerize R Markdown Documents</h1>
- </div>
-
- <p>Containerize R Markdown documents. This function generates
- <code>Dockerfile</code> based on the liftr metadata in the RMD document.</p>
-
- <pre class="usage"><span class='fu'>lift</span>(<span class='kw'>input</span> <span class='kw'>=</span> <span class='kw'>NULL</span>, <span class='kw'>use_config</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>, <span class='kw'>config_file</span> <span class='kw'>=</span> <span class='st'>"_liftr.yml"</span>,
- <span class='kw'>output_dir</span> <span class='kw'>=</span> <span class='kw'>NULL</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>input</th>
- <td><p>Input (R Markdown) file.</p></td>
- </tr>
- <tr>
- <th>use_config</th>
- <td><p>If <code>TRUE</code>, will parse the liftr metadata from
- a YAML file, if <code>FALSE</code>, will parse such information from the
- metadata section in the R Markdown file. Default is <code>FALSE</code>.</p></td>
- </tr>
- <tr>
- <th>config_file</th>
- <td><p>Name of the YAML configuration file, under the
- same directory as the input file. Default is <code>"_liftr.yml"</code>.</p></td>
- </tr>
- <tr>
- <th>output_dir</th>
- <td><p>Directory to output <code>Dockerfile</code>.
- If not provided, will be the same directory as <code>input</code>.</p></td>
- </tr>
- </table>
-
- <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>
- <p><code>Dockerfile</code>.</p>
-
- <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>
- <p>After running lift, run <a href='render_docker.html'>render_docker</a> on the document to
- render the containerized R Markdown document using Docker containers.
- See <code><a href='../articles/liftr-intro.html'>vignette('liftr-intro')</a></code> for details about the extended
- YAML front-matter metadata format used by liftr.</p>
-
- <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
- <pre class="examples"><div class='input'><span class='co'># copy example file</span>
- <span class='no'>dir_example</span> <span class='kw'>=</span> <span class='fu'>paste0</span>(<span class='fu'>tempdir</span>(), <span class='st'>'/liftr-minimal/'</span>)
- <span class='fu'>dir.create</span>(<span class='no'>dir_example</span>)
- <span class='fu'>file.copy</span>(<span class='fu'>system.file</span>(<span class='st'>"examples/liftr-minimal.Rmd"</span>, <span class='kw'>package</span> <span class='kw'>=</span> <span class='st'>"liftr"</span>), <span class='no'>dir_example</span>)</div><div class='output co'>#> [1] TRUE</div><div class='input'>
- <span class='co'># containerization</span>
- <span class='no'>input</span> <span class='kw'>=</span> <span class='fu'>paste0</span>(<span class='no'>dir_example</span>, <span class='st'>"liftr-minimal.Rmd"</span>)
- <span class='fu'>lift</span>(<span class='no'>input</span>)</div><span class='co'># NOT RUN {</span>
- <span class='co'># render the document with Docker</span>
- <span class='fu'><a href='render_docker.html'>render_docker</a></span>(<span class='no'>input</span>)
- <span class='co'># view rendered document</span>
- <span class='fu'>browseURL</span>(<span class='fu'>paste0</span>(<span class='no'>dir_example</span>, <span class='st'>"liftr-minimal.html"</span>))
- <span class='co'># purge the generated Docker image</span>
- <span class='fu'><a href='prune_image.html'>purge_image</a></span>(<span class='fu'>paste0</span>(<span class='no'>dir_example</span>, <span class='st'>"liftr-minimal.docker.yml"</span>))
- <span class='co'># }</span></pre>
- </div>
- <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
- <h2>Contents</h2>
- <ul class="nav nav-pills nav-stacked">
- <li><a href="#arguments">Arguments</a></li>
-
- <li><a href="#value">Value</a></li>
- <li><a href="#details">Details</a></li>
-
- <li><a href="#examples">Examples</a></li>
- </ul>
- </div>
- </div>
- <footer>
- <div class="copyright">
- <p>Developed by Nan Xiao.</p>
- </div>
- <div class="pkgdown">
- <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
- </div>
- </footer>
- </div>
- </body>
- </html>
|