EVOLUTION-MANAGER
Edit File: NS.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: Namespaced IDs for inputs/outputs</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 NS {shiny}"><tr><td>NS {shiny}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Namespaced IDs for inputs/outputs</h2> <h3>Description</h3> <p>The <code>NS</code> function creates namespaced IDs out of bare IDs, by joining them using <code>ns.sep</code> as the delimiter. It is intended for use in Shiny modules. See <a href="http://shiny.rstudio.com/articles/modules.html">http://shiny.rstudio.com/articles/modules.html</a>. </p> <h3>Usage</h3> <pre> NS(namespace, id = NULL) ns.sep </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>namespace</code></td> <td> <p>The character vector to use for the namespace. This can have any length, though a single element is most common. Length 0 will cause the <code>id</code> to be returned without a namespace, and length 2 will be interpreted as multiple namespaces, in increasing order of specificity (i.e. starting with the top-level namespace).</p> </td></tr> <tr valign="top"><td><code>id</code></td> <td> <p>The id string to be namespaced (optional).</p> </td></tr> </table> <h3>Format</h3> <p>An object of class <code>character</code> of length 1. </p> <h3>Details</h3> <p>Shiny applications use IDs to identify inputs and outputs. These IDs must be unique within an application, as accidentally using the same input/output ID more than once will result in unexpected behavior. The traditional solution for preventing name collisions is <em>namespaces</em>; a namespace is to an ID as a directory is to a file. Use the <code>NS</code> function to turn a bare ID into a namespaced one, by combining them with <code>ns.sep</code> in between. </p> <h3>Value</h3> <p>If <code>id</code> is missing, returns a function that expects an id string as its only argument and returns that id with the namespace prepended. </p> <h3>See Also</h3> <p><a href="http://shiny.rstudio.com/articles/modules.html">http://shiny.rstudio.com/articles/modules.html</a> </p> <hr /><div style="text-align: center;">[Package <em>shiny</em> version 1.5.0 <a href="00Index.html">Index</a>]</div> </body></html>