EVOLUTION-MANAGER
Edit File: use_tutorial.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Create a learnr tutorial</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for use_tutorial {usethis}"><tr><td>use_tutorial {usethis}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Create a learnr tutorial</h2> <h3>Description</h3> <p>Creates a new tutorial below <code style="white-space: pre;">inst/tutorials/</code>. Tutorials are interactive R Markdown documents built with the <a href="https://rstudio.github.io/learnr/index.html"><code>learnr</code> package</a>. <code>use_tutorial()</code> does this setup: </p> <ul> <li><p> Adds learnr to Suggests in <code>DESCRIPTION</code>. </p> </li> <li><p> Gitignores <code style="white-space: pre;">inst/tutorials/*.html</code> so you don't accidentally track rendered tutorials. </p> </li> <li><p> Creates a new <code>.Rmd</code> tutorial from a template and, optionally, opens it for editing. </p> </li> <li><p> Adds new <code>.Rmd</code> to <code>.Rbuildignore</code>. </p> </li></ul> <h3>Usage</h3> <pre> use_tutorial(name, title, open = rlang::is_interactive()) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>name</code></td> <td> <p>Base for file name to use for new <code>.Rmd</code> tutorial. Should consist only of numbers, letters, <code style="white-space: pre;">_</code> and <code>-</code>. We recommend using lower case.</p> </td></tr> <tr valign="top"><td><code>title</code></td> <td> <p>The human-facing title of the tutorial.</p> </td></tr> <tr valign="top"><td><code>open</code></td> <td> <p>Open the newly created file for editing? Happens in RStudio, if applicable, or via <code><a href="../../utils/html/file.edit.html">utils::file.edit()</a></code> otherwise.</p> </td></tr> </table> <h3>See Also</h3> <p>The <a href="https://rstudio.github.io/learnr/index.html">learnr package documentation</a>. </p> <h3>Examples</h3> <pre> ## Not run: use_tutorial("learn-to-do-stuff", "Learn to do stuff") ## End(Not run) </pre> <hr /><div style="text-align: center;">[Package <em>usethis</em> version 2.1.6 <a href="00Index.html">Index</a>]</div> </body></html>