mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2025-09-12 09:59:39 +02:00
139 lines
11 KiB
HTML
139 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<!-- Generated by pkgdown: do not edit by hand --><html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Module to Reorder the Levels of a Factor Variable — update-factor • FreesearchR</title><!-- favicons --><link rel="icon" type="image/png" sizes="96x96" href="../favicon-96x96.png"><link rel="icon" type="”image/svg+xml”" href="../favicon.svg"><link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png"><link rel="icon" sizes="any" href="../favicon.ico"><link rel="manifest" href="../site.webmanifest"><script src="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"><link href="../deps/bootstrap-5.3.1/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><link href="../deps/Montserrat-0.4.10/font.css" rel="stylesheet"><link href="../deps/Public_Sans-0.4.10/font.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/all.min.css" rel="stylesheet"><link href="../deps/font-awesome-6.5.2/css/v4-shims.min.css" rel="stylesheet"><script src="../deps/headroom-0.11.0/headroom.min.js"></script><script src="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><script src="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><script src="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><script src="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><script src="../deps/search-1.0.0/fuse.min.js"></script><script src="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><script src="../pkgdown.js"></script><link href="../extra.css" rel="stylesheet"><meta property="og:title" content="Module to Reorder the Levels of a Factor Variable — update-factor"><meta name="description" content="This module contain an interface to reorder the levels of a factor variable."><meta property="og:description" content="This module contain an interface to reorder the levels of a factor variable."><meta property="og:image" content="https://agdamsbo.github.io/FreesearchR/logo.png"><script defer src="https://stats.freesearchr.org/script.js" data-website-id="85bfd1e8-2cbe-4a4a-aa34-1dfb2960905b"></script></head><body>
|
|
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
|
|
|
|
|
|
<nav class="navbar navbar-expand-lg fixed-top bg-primary" data-bs-theme="dark" aria-label="Site navigation"><div class="container">
|
|
|
|
<a class="navbar-brand me-2" href="../index.html">FreesearchR</a>
|
|
|
|
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">25.7.3</small>
|
|
|
|
|
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
|
|
<span class="navbar-toggler-icon"></span>
|
|
</button>
|
|
|
|
<div id="navbar" class="collapse navbar-collapse ms-3">
|
|
<ul class="navbar-nav me-auto"><li class="nav-item"><a class="nav-link" href="../articles/FreesearchR.html">Get started</a></li>
|
|
<li class="active nav-item"><a class="nav-link" href="../reference/index.html">Reference</a></li>
|
|
<li class="nav-item dropdown">
|
|
<button class="nav-link dropdown-toggle" type="button" id="dropdown-articles" data-bs-toggle="dropdown" aria-expanded="false" aria-haspopup="true">Articles</button>
|
|
<ul class="dropdown-menu" aria-labelledby="dropdown-articles"><li><a class="dropdown-item" href="../articles/data-types.html">Data types</a></li>
|
|
<li><a class="dropdown-item" href="../articles/missingness.html">Missingness in data</a></li>
|
|
<li><a class="dropdown-item" href="../articles/session.html">Session info</a></li>
|
|
<li><a class="dropdown-item" href="../articles/visuals.html">On visuals</a></li>
|
|
</ul></li>
|
|
<li class="nav-item"><a class="nav-link" href="../ROADMAP.html">Roadmap</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="../QA.html">Q&A</a></li>
|
|
<li class="nav-item"><a class="nav-link" href="../news/index.html">Changelog</a></li>
|
|
</ul><ul class="navbar-nav"><li class="nav-item"><form class="form-inline" role="search">
|
|
<input class="form-control" type="search" name="search-input" id="search-input" autocomplete="off" aria-label="Search site" placeholder="Search for" data-search-index="../search.json"></form></li>
|
|
<li class="nav-item"><a class="external-link nav-link" href="https://github.com/agdamsbo/FreesearchR/" aria-label="GitHub"><span class="fa fab fa-github fa-lg"></span></a></li>
|
|
</ul></div>
|
|
|
|
|
|
</div>
|
|
</nav><div class="container template-reference-topic">
|
|
<div class="row">
|
|
<main id="main" class="col-md-9"><div class="page-header">
|
|
<img src="../logo.png" class="logo" alt=""><h1>Module to Reorder the Levels of a Factor Variable</h1>
|
|
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/FreesearchR/blob/main/R/update-factor-ext.R" class="external-link"><code>R/update-factor-ext.R</code></a></small>
|
|
<div class="d-none name"><code>update-factor.Rd</code></div>
|
|
</div>
|
|
|
|
<div class="ref-description section level2">
|
|
<p>This module contain an interface to reorder the levels of a factor variable.</p>
|
|
</div>
|
|
|
|
<div class="section level2">
|
|
<h2 id="ref-usage">Usage<a class="anchor" aria-label="anchor" href="#ref-usage"></a></h2>
|
|
<div class="sourceCode"><pre class="sourceCode r"><code><span><span class="fu">update_factor_ui</span><span class="op">(</span><span class="va">id</span><span class="op">)</span></span>
|
|
<span></span>
|
|
<span><span class="fu">update_factor_server</span><span class="op">(</span><span class="va">id</span>, data_r <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/pkg/shiny/man/reactive.html" class="external-link">reactive</a></span><span class="op">(</span><span class="cn">NULL</span><span class="op">)</span><span class="op">)</span></span>
|
|
<span></span>
|
|
<span><span class="fu">modal_update_factor</span><span class="op">(</span></span>
|
|
<span> <span class="va">id</span>,</span>
|
|
<span> title <span class="op">=</span> <span class="fu">i18n</span><span class="op">(</span><span class="st">"Update levels of a factor"</span><span class="op">)</span>,</span>
|
|
<span> easyClose <span class="op">=</span> <span class="cn">TRUE</span>,</span>
|
|
<span> size <span class="op">=</span> <span class="st">"l"</span>,</span>
|
|
<span> footer <span class="op">=</span> <span class="cn">NULL</span></span>
|
|
<span><span class="op">)</span></span>
|
|
<span></span>
|
|
<span><span class="fu">winbox_update_factor</span><span class="op">(</span></span>
|
|
<span> <span class="va">id</span>,</span>
|
|
<span> title <span class="op">=</span> <span class="fu">i18n</span><span class="op">(</span><span class="st">"Update levels of a factor"</span><span class="op">)</span>,</span>
|
|
<span> options <span class="op">=</span> <span class="fu">shinyWidgets</span><span class="fu">::</span><span class="fu"><a href="https://dreamrs.github.io/shinyWidgets/reference/wbOptions.html" class="external-link">wbOptions</a></span><span class="op">(</span><span class="op">)</span>,</span>
|
|
<span> controls <span class="op">=</span> <span class="fu">shinyWidgets</span><span class="fu">::</span><span class="fu"><a href="https://dreamrs.github.io/shinyWidgets/reference/wbControls.html" class="external-link">wbControls</a></span><span class="op">(</span><span class="op">)</span></span>
|
|
<span><span class="op">)</span></span></code></pre></div>
|
|
</div>
|
|
|
|
<div class="section level2">
|
|
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
|
|
|
|
|
|
<dl><dt id="arg-id">id<a class="anchor" aria-label="anchor" href="#arg-id"></a></dt>
|
|
<dd><p>Module ID.</p></dd>
|
|
|
|
|
|
<dt id="arg-data-r">data_r<a class="anchor" aria-label="anchor" href="#arg-data-r"></a></dt>
|
|
<dd><p>A <code><a href="https://rdrr.io/pkg/shiny/man/reactive.html" class="external-link">shiny::reactive()</a></code> function returning a <code>data.frame</code>.</p></dd>
|
|
|
|
|
|
<dt id="arg-title">title<a class="anchor" aria-label="anchor" href="#arg-title"></a></dt>
|
|
<dd><p>An optional title for the dialog.</p></dd>
|
|
|
|
|
|
<dt id="arg-easyclose">easyClose<a class="anchor" aria-label="anchor" href="#arg-easyclose"></a></dt>
|
|
<dd><p>If <code>TRUE</code>, the modal dialog can be dismissed by
|
|
clicking outside the dialog box, or be pressing the Escape key. If
|
|
<code>FALSE</code> (the default), the modal dialog can't be dismissed in those
|
|
ways; instead it must be dismissed by clicking on a <code><a href="https://rdrr.io/pkg/shiny/man/modalDialog.html" class="external-link">modalButton()</a></code>, or
|
|
from a call to <code><a href="https://rdrr.io/pkg/shiny/man/showModal.html" class="external-link">removeModal()</a></code> on the server.</p></dd>
|
|
|
|
|
|
<dt id="arg-size">size<a class="anchor" aria-label="anchor" href="#arg-size"></a></dt>
|
|
<dd><p>One of <code>"s"</code> for small, <code>"m"</code> (the default) for medium,
|
|
<code>"l"</code> for large, or <code>"xl"</code> for extra large. Note that <code>"xl"</code> only
|
|
works with Bootstrap 4 and above (to opt-in to Bootstrap 4+,
|
|
pass <code><a href="https://rstudio.github.io/bslib/reference/bs_theme.html" class="external-link">bslib::bs_theme()</a></code> to the <code>theme</code> argument of a page container
|
|
like <code><a href="https://rdrr.io/pkg/shiny/man/fluidPage.html" class="external-link">fluidPage()</a></code>).</p></dd>
|
|
|
|
|
|
<dt id="arg-footer">footer<a class="anchor" aria-label="anchor" href="#arg-footer"></a></dt>
|
|
<dd><p>UI for footer. Use <code>NULL</code> for no footer.</p></dd>
|
|
|
|
|
|
<dt id="arg-options">options<a class="anchor" aria-label="anchor" href="#arg-options"></a></dt>
|
|
<dd><p>List of options, see <code><a href="https://dreamrs.github.io/shinyWidgets/reference/wbOptions.html" class="external-link">wbOptions()</a></code>.</p></dd>
|
|
|
|
|
|
<dt id="arg-controls">controls<a class="anchor" aria-label="anchor" href="#arg-controls"></a></dt>
|
|
<dd><p>List of controls, see <code><a href="https://dreamrs.github.io/shinyWidgets/reference/wbControls.html" class="external-link">wbControls()</a></code>.</p></dd>
|
|
|
|
</dl></div>
|
|
<div class="section level2">
|
|
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
|
|
<p>A <code><a href="https://rdrr.io/pkg/shiny/man/reactive.html" class="external-link">shiny::reactive()</a></code> function returning the data.</p>
|
|
</div>
|
|
|
|
</main><aside class="col-md-3"><nav id="toc" aria-label="Table of contents"><h2>On this page</h2>
|
|
</nav></aside></div>
|
|
|
|
|
|
<footer><div class="pkgdown-footer-left">
|
|
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.1.3.</p>
|
|
</div>
|
|
|
|
<div class="pkgdown-footer-right">
|
|
<p>Developed by Andreas Gammelgaard Damsbo. Provided without <strong>any warranty</strong>.</p>
|
|
</div>
|
|
|
|
</footer></div>
|
|
|
|
|
|
|
|
|
|
|
|
</body></html>
|
|
|