EVOLUTION-MANAGER
Edit File: shinyAppTemplate.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: Generate a Shiny application from a template</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 shinyAppTemplate {shiny}"><tr><td>shinyAppTemplate {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Generate a Shiny application from a template</h2> <h3>Description</h3> <p>This function populates a directory with files for a Shiny application. </p> <h3>Usage</h3> <pre> shinyAppTemplate(path = NULL, examples = "default", dryrun = FALSE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>path</code></td> <td> <p>Path to create new shiny application template.</p> </td></tr> <tr valign="top"><td><code>examples</code></td> <td> <p>Either one of "default", "ask", "all", or any combination of "app", "rdir", "module", "shinytest", and "testthat". In an interactive session, "default" falls back to "ask"; in a non-interactive session, "default" falls back to "all". With "ask", this function will prompt the user to select which template items will be added to the new app directory. With "all", all template items will be added to the app directory.</p> </td></tr> <tr valign="top"><td><code>dryrun</code></td> <td> <p>If <code>TRUE</code>, don't actually write any files; just print out which files would be written.</p> </td></tr> </table> <h3>Details</h3> <p>In an interactive R session, this function will, by default, prompt the user to select which components to add to the application. Choices are</p> <pre>1: All 2: app.R : Main application file 3: R/example.R : Helper file with R code 4: R/example-module.R : Example module 5: tests/shinytest/ : Tests using the shinytest package 6: tests/testthat/ : Tests using the testthat package </pre> <p>If option 1 is selected, the full example application including the following files and directories is created:</p> <pre>appdir/ |- app.R |- R | |- example-module.R | `- example.R `- tests |- shinytest.R |- shinytest | `- mytest.R |- testthat.R `- testthat |- test-examplemodule.R |- test-server.R `- test-sort.R </pre> <p>Some notes about these files: </p> <ul> <li> <p><code>app.R</code> is the main application file. </p> </li> <li><p> All files in the <code style="white-space: pre;">R/</code> subdirectory are automatically sourced when the application is run. </p> </li> <li> <p><code>R/example.R</code> and <code>R/example-module.R</code> are automatically sourced when the application is run. The first contains a function <code>lexical_sort()</code>, and the second contains code for module created by the <code><a href="moduleServer.html">moduleServer()</a></code> function, which is used in the application. </p> </li> <li> <p><code style="white-space: pre;">tests/</code> contains various tests for the application. You may choose to use or remove any of them. They can be executed by the <code><a href="runTests.html">runTests()</a></code> function. </p> </li> <li> <p><code>tests/shinytest.R</code> is a test runner for test files in the <code style="white-space: pre;">tests/shinytest/</code> directory. </p> </li> <li> <p><code>tests/shinytest/mytest.R</code> is a test that uses the <a href="https://rstudio.github.io/shinytest/">shinytest</a> package to do snapshot-based testing. </p> </li> <li> <p><code>tests/testthat.R</code> is a test runner for test files in the <code style="white-space: pre;">tests/testthat/</code> directory using the <a href="https://testthat.r-lib.org/">testthat</a> package. </p> </li> <li> <p><code>tests/testthat/test-examplemodule.R</code> is a test for an application's module server function. </p> </li> <li> <p><code>tests/testthat/test-server.R</code> is a test for the application's server code </p> </li> <li> <p><code>tests/testthat/test-sort.R</code> is a test for a supporting function in the <code style="white-space: pre;">R/</code> directory. </p> </li></ul> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>