Deploying to gh-pages from @ agdamsbo/stRoke@ec7bb2c349 🚀

This commit is contained in:
agdamsbo 2023-06-30 08:04:32 +00:00
parent 8526d1ac6f
commit 30c3a7ab36
63 changed files with 15932 additions and 0 deletions

1
.nojekyll Normal file
View File

@ -0,0 +1 @@

104
404.html Normal file
View File

@ -0,0 +1,104 @@
<!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>Page not found (404) • stRoke</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="https://agdamsbo.github.io/stRoke/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://agdamsbo.github.io/stRoke/favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://agdamsbo.github.io/stRoke/apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="https://agdamsbo.github.io/stRoke/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="https://agdamsbo.github.io/stRoke/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="https://agdamsbo.github.io/stRoke/apple-touch-icon-60x60.png">
<script src="https://agdamsbo.github.io/stRoke/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="https://agdamsbo.github.io/stRoke/deps/bootstrap-5.2.2/bootstrap.min.css" rel="stylesheet">
<script src="https://agdamsbo.github.io/stRoke/deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="https://agdamsbo.github.io/stRoke/pkgdown.js"></script><meta property="og:title" content="Page not found (404)">
<meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]-->
</head>
<body>
<a href="https://agdamsbo.github.io/stRoke/#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="https://agdamsbo.github.io/stRoke/index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="https://agdamsbo.github.io/stRoke/reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="https://agdamsbo.github.io/stRoke/#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="https://agdamsbo.github.io/stRoke/articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="https://agdamsbo.github.io/stRoke/articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="https://agdamsbo.github.io/stRoke/news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-title-body">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="https://agdamsbo.github.io/stRoke/logo.png" class="logo" alt=""><h1>Page not found (404)</h1>
</div>
Content not found. Please use links in the navbar.
</main>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
apple-touch-icon-60x60.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
apple-touch-icon-76x76.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
apple-touch-icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

192
articles/ds2dd.html Normal file
View File

@ -0,0 +1,192 @@
<!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">
<meta name="description" content="stRoke">
<title>ds2dd • stRoke</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<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.2.2/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="ds2dd">
<meta property="og:description" content="stRoke">
<meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]-->
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="../reference/index.html">Reference</a>
</li>
<li class="active nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-article">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.png" class="logo" alt=""><h1>ds2dd</h1>
<h4 data-toc-skip class="date">2023-06-30</h4>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/vignettes/ds2dd.Rmd" class="external-link"><code>vignettes/ds2dd.Rmd</code></a></small>
<div class="d-none name"><code>ds2dd.Rmd</code></div>
</div>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://agdamsbo.github.io/stRoke/">stRoke</a></span><span class="op">)</span></span></code></pre></div>
<div class="section level2">
<h2 id="easy-data-set-to-data-base-workflow">Easy data set to data base workflow<a class="anchor" aria-label="anchor" href="#easy-data-set-to-data-base-workflow"></a>
</h2>
<p>This function can be used as a simple tool for creating at data base
metadata file for REDCap (called a DataDictionary) based on a given data
set file.</p>
<div class="section level3">
<h3 id="step-1---load-your-data-set">Step 1 - Load your data set<a class="anchor" aria-label="anchor" href="#step-1---load-your-data-set"></a>
</h3>
<p>Here well use the sample TALOS dataset included with the
package.</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="st">"talos"</span><span class="op">)</span></span>
<span><span class="va">ds</span> <span class="op">&lt;-</span> <span class="va">talos</span></span>
<span><span class="co"># As the data set lacks an ID column, one is added</span></span>
<span><span class="va">ds</span><span class="op">$</span><span class="va">id</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">nrow</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level3">
<h3 id="step-2---create-the-datadictionary">Step 2 - Create the DataDictionary<a class="anchor" aria-label="anchor" href="#step-2---create-the-datadictionary"></a>
</h3>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="va">datadictionary</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/ds2dd.html">ds2dd</a></span><span class="op">(</span><span class="va">ds</span>,record.id <span class="op">=</span> <span class="st">"id"</span>,include.column.names <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
<p>Now additional specifications to the DataDictionary can be made
manually, or it can be uploaded and modified manually in the graphical
user interface on the web page.</p>
<p>The function will transform column names to lower case and substitute
spaces for underscores. The output is a list with the DataDictionary and
a vector of new column names for the dataset to fit the meta data.</p>
</div>
<div class="section level3">
<h3 id="step-3---meta-data-upload">Step 3 - Meta data upload<a class="anchor" aria-label="anchor" href="#step-3---meta-data-upload"></a>
</h3>
<p>Now the DataDictionary can be exported as a spreadsheet and uploaded
or it can be uploaded using the <code>REDCapR</code> package (only
projects with “Development” status).</p>
<p>Use one of the two approaches below:</p>
<div class="section level4">
<h4 id="manual-upload">Manual upload<a class="anchor" aria-label="anchor" href="#manual-upload"></a>
</h4>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/write.table.html" class="external-link">write.csv</a></span><span class="op">(</span><span class="va">datadictionary</span><span class="op">$</span><span class="va">DataDictionary</span>,<span class="st">"datadictionary.csv"</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level4">
<h4 id="upload-with-redcapr">Upload with <code>REDCapR</code><a class="anchor" aria-label="anchor" href="#upload-with-redcapr"></a>
</h4>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu">REDCapR</span><span class="fu">::</span><span class="fu">redcap_metadata_write</span><span class="op">(</span></span>
<span> <span class="va">datadictionary</span><span class="op">$</span><span class="va">DataDictionary</span>,</span>
<span> redcap_uri <span class="op">=</span> <span class="fu">keyring</span><span class="fu">::</span><span class="fu">key_get</span><span class="op">(</span><span class="st">"DB_URI"</span><span class="op">)</span>,</span>
<span> token <span class="op">=</span> <span class="fu">keyring</span><span class="fu">::</span><span class="fu">key_get</span><span class="op">(</span><span class="st">"DB_TOKEN"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
<p>In the <a href="https://agdamsbo.github.io/redcap-r-handbook/" class="external-link">“REDCap R
Handbook”</a> more is written on interfacing with REDCap in R using the
<code><a href="https://r-lib.github.io/keyring/index.html" class="external-link">library(keyring)</a></code>to store credentials in <a href="https://agdamsbo.github.io/redcap-r-handbook/access.html#sec-getting-access" class="external-link">chapter
1.1</a>.</p>
</div>
</div>
<div class="section level3">
<h3 id="step-4---data-upload">Step 4 - Data upload<a class="anchor" aria-label="anchor" href="#step-4---data-upload"></a>
</h3>
<p>The same two options are available for data upload as meta data
upload: manual or through <code>REDCapR</code>.</p>
<p>Only the latter is shown here.</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="co"># new column names are applied</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/colnames.html" class="external-link">colnames</a></span><span class="op">(</span><span class="va">ds</span><span class="op">)</span> <span class="op">&lt;-</span> <span class="va">datadictionary</span><span class="op">$</span><span class="va">`Column names`</span></span>
<span></span>
<span><span class="fu">REDCapR</span><span class="fu">::</span><span class="fu">redcap_write</span><span class="op">(</span></span>
<span> <span class="va">ds</span>,</span>
<span> redcap_uri <span class="op">=</span> <span class="fu">keyring</span><span class="fu">::</span><span class="fu">key_get</span><span class="op">(</span><span class="st">"DB_URI"</span><span class="op">)</span>,</span>
<span> token <span class="op">=</span> <span class="fu">keyring</span><span class="fu">::</span><span class="fu">key_get</span><span class="op">(</span><span class="st">"DB_TOKEN"</span><span class="op">)</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</body>
</html>

80
articles/index.html Normal file
View File

@ -0,0 +1,80 @@
<!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>Articles • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Articles"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-article-index">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.png" class="logo" alt=""><h1>Articles</h1>
</div>
<div class="section ">
<h3>All vignettes</h3>
<p class="section-desc"></p>
<dl><dt><a href="ds2dd.html">ds2dd</a></dt>
<dd>
</dd><dt><a href="toolbox.html">Toolbox</a></dt>
<dd>
</dd></dl></div>
</main></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

803
articles/toolbox.html Normal file
View File

@ -0,0 +1,803 @@
<!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">
<meta name="description" content="stRoke">
<title>Toolbox • stRoke</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png">
<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.2.2/bootstrap.min.css" rel="stylesheet">
<script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Toolbox">
<meta property="og:description" content="stRoke">
<meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]-->
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="../reference/index.html">Reference</a>
</li>
<li class="active nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-article">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.png" class="logo" alt=""><h1>Toolbox</h1>
<h4 data-toc-skip class="date">2023-06-30</h4>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/vignettes/toolbox.Rmd" class="external-link"><code>vignettes/toolbox.Rmd</code></a></small>
<div class="d-none name"><code>toolbox.Rmd</code></div>
</div>
<div class="sourceCode" id="cb1"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="kw"><a href="https://rdrr.io/r/base/library.html" class="external-link">library</a></span><span class="op">(</span><span class="va"><a href="https://agdamsbo.github.io/stRoke/">stRoke</a></span><span class="op">)</span></span></code></pre></div>
<div class="section level2">
<h2 id="a-toolbox">A toolbox<a class="anchor" aria-label="anchor" href="#a-toolbox"></a>
</h2>
<p>My own toolbox in my small workshop is a mix of some old, worn, well
proven tools and some newcomers. This package should be seen as
something like that.</p>
<p>I have tried to collect tools and functions from other packages that
I use regularly in addition to functions that I have written myself to
fill use cases, that I have not been able to find solutions to
elsewhere.</p>
<p>In documenting and testing the package, I have used <a href="https://platform.openai.com/overview" class="external-link">OpenAIs</a> chatgpt with <a href="https://jameshwade.github.io/gpttools/" class="external-link">gpttools</a>. The chatgpt
is an interesting tool, that is in no way perfect, but it helps with
tedious tasks. Both <code>gpttools</code> and <a href="https://michelnivard.github.io/gptstudio/" class="external-link"><code>gptstudio</code></a>
are interesting implementations in R and RStudio.</p>
<div class="section level3">
<h3 id="cpr-intro">CPR manipulations<a class="anchor" aria-label="anchor" href="#cpr-intro"></a>
</h3>
<p>Note that, if handled, CPR numbers (social security numbers) should
be handled with care as they a considered highly sensitive data.</p>
<p>The CPR number is structured as <em>DDMMYY-XXXX</em>, with the 1st
<em>X</em> designating decade of birth, the last <em>X</em> designate
binary gender (not biological sex) dependent on even/uneven as
female/male, and the last for digits are used in a modulus calculation
to verify the validity of the CPR number. Foreigners and unidentified
persons are given temporary CPR numbers including letters.</p>
<p>More information can be found on <a href="https://cpr.dk" class="external-link">cpr.dk</a>.</p>
<p>Note, that all CPR numbers used in examples are publicly known or
non-organic.</p>
<div class="section level4">
<h4 id="age_calc">age_calc()<a class="anchor" aria-label="anchor" href="#age_calc"></a>
</h4>
<p>The age_calc() function was created as a learning exercise and
functions similarly to <code><a href="https://lubridate.tidyverse.org/reference/time_length.html" class="external-link">lubridate::time_length()</a></code>.</p>
<div class="sourceCode" id="cb2"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="op">(</span><span class="va">age</span> <span class="op">&lt;-</span> <span class="fu"><a href="../reference/age_calc.html">age_calc</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"1945-10-23"</span><span class="op">)</span>, <span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"2018-09-30"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] 72.93699</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">trunc</a></span><span class="op">(</span><span class="va">age</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] 72</span></span></code></pre></div>
</div>
<div class="section level4">
<h4 id="cpr_check">cpr_check()<a class="anchor" aria-label="anchor" href="#cpr_check"></a>
</h4>
<p>Checks validity of CPR numbers according to the <a href="https://cpr.dk/cpr-systemet/opbygning-af-cpr-nummeret" class="external-link">modulus 11
rule</a>. Note that due to limitations in the possible available CPR
numbers, this rule <a href="https://cpr.dk/cpr-systemet/personnumre-uden-kontrolciffer-modulus-11-kontrol" class="external-link">does
not apply to all CPR numbers after 2007</a>.</p>
<div class="sourceCode" id="cb3"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/cpr_check.html">cpr_check</a></span><span class="op">(</span></span>
<span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span>
<span> <span class="st">"2310450637"</span>,</span>
<span> <span class="st">"010190-2000"</span>,</span>
<span> <span class="st">"010115-4000"</span>,</span>
<span> <span class="st">"300450-1030"</span>,</span>
<span> <span class="st">"010150-4021"</span>,</span>
<span> <span class="st">"010150-4AA1"</span></span>
<span> <span class="op">)</span></span>
<span><span class="op">)</span></span>
<span><span class="co">#&gt; OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; See the vignette 'Toolbox'</span></span>
<span><span class="co">#&gt; Warning in matrix(as.numeric(unlist(strsplit(cpr_short, ""))), nrow = 10): NAs</span></span>
<span><span class="co">#&gt; introduced by coercion</span></span>
<span><span class="co">#&gt; [1] TRUE FALSE FALSE FALSE FALSE NA</span></span></code></pre></div>
<p>Including CPR numbers with letters gives a warning and
<code>NA</code>, as it can not be checked by the modulus 11 function.
Should be used with care, see the message.</p>
</div>
<div class="section level4">
<h4 id="cpr_dob">cpr_dob()<a class="anchor" aria-label="anchor" href="#cpr_dob"></a>
</h4>
<p>Extracts date of birth (DOB) from a CPR number. Accounts for the
decade of birth. <a href="#cpr-intro">See earlier</a>.</p>
<div class="sourceCode" id="cb4"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/cpr_dob.html">cpr_dob</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span></span>
<span> <span class="st">"2310450637"</span>,</span>
<span> <span class="st">"010190-2000"</span>,</span>
<span> <span class="st">"010115-4000"</span>,</span>
<span> <span class="st">"300450-1030"</span>,</span>
<span> <span class="st">"010150-4021"</span></span>
<span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; [1] "23-10-1945" "01-01-1990" "01-01-2015" "30-04-1950" "01-01-1950"</span></span></code></pre></div>
</div>
<div class="section level4">
<h4 id="cpr_female">cpr_female()<a class="anchor" aria-label="anchor" href="#cpr_female"></a>
</h4>
<p>Gives logical vector of whether female gender from last digit of
CPR.</p>
<div class="sourceCode" id="cb5"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/base/table.html" class="external-link">table</a></span><span class="op">(</span><span class="fu"><a href="../reference/cpr_female.html">cpr_female</a></span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="../reference/cprs.html">cprs</a></span><span class="op">[</span>, <span class="fl">1</span><span class="op">]</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; FALSE TRUE </span></span>
<span><span class="co">#&gt; 98 102</span></span></code></pre></div>
</div>
</div>
<div class="section level3">
<h3 id="plotting">Plotting<a class="anchor" aria-label="anchor" href="#plotting"></a>
</h3>
<div class="section level4">
<h4 id="ci_plot">ci_plot()<a class="anchor" aria-label="anchor" href="#ci_plot"></a>
</h4>
<p>Plots odds ratios with 95 % confidence intervals. Performs binary
logistic regression for outcome factors with two (2) levels and ordinal
logistic regression for outcome factors with more than two levels. Mind
relevant assumptions.</p>
<p>Outputs ggplot element for further manipulation.</p>
<div class="sourceCode" id="cb6"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">talos</span><span class="op">)</span></span>
<span><span class="va">talos</span><span class="op">[</span>, <span class="st">"mrs_1"</span><span class="op">]</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a></span><span class="op">(</span><span class="va">talos</span><span class="op">[</span>, <span class="st">"mrs_1"</span><span class="op">]</span>, ordered <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span>
<span><span class="fu"><a href="../reference/ci_plot.html">ci_plot</a></span><span class="op">(</span></span>
<span> ds <span class="op">=</span> <span class="va">talos</span>,</span>
<span> x <span class="op">=</span> <span class="st">"rtreat"</span>,</span>
<span> y <span class="op">=</span> <span class="st">"mrs_1"</span>,</span>
<span> vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"hypertension"</span>, <span class="st">"diabetes"</span><span class="op">)</span></span>
<span><span class="op">)</span></span>
<span><span class="co">#&gt; Waiting for profiling to be done...</span></span></code></pre></div>
<p><img src="toolbox_files/figure-html/ci_plot-example-1.png" width="700"></p>
</div>
<div class="section level4">
<h4 id="generic_stroke">generic_stroke()<a class="anchor" aria-label="anchor" href="#generic_stroke"></a>
</h4>
<p>For learning purposes. Uses annonymized data from the <a href="https://doi.org/10.1161/STROKEAHA.117.020067" class="external-link">TALOS trial</a> to
output a Table 1 (with <code><a href="https://www.danieldsjoberg.com/gtsummary/reference/tbl_summary.html" class="external-link">gtsummary::tbl_summary()</a></code>), plotting
the so-called grotta-bars based on mRS scores (with
<code><a href="https://rdrr.io/pkg/rankinPlot/man/grottaBar.html" class="external-link">rankinPlot::grottaBar()</a></code>) and a ordinal logistic regression
model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a></code>).</p>
<div class="sourceCode" id="cb7"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/generic_stroke.html">generic_stroke</a></span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="../reference/talos.html">talos</a></span>,</span>
<span> <span class="st">"rtreat"</span>,</span>
<span> <span class="st">"mrs_6"</span>,</span>
<span> variables <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"hypertension"</span>, <span class="st">"diabetes"</span>, <span class="st">"civil"</span><span class="op">)</span><span class="op">)</span></span>
<span><span class="co">#&gt; Waiting for profiling to be done...</span></span>
<span><span class="co">#&gt; $`Table 1`</span></span>
<span><span class="co">#&gt; &lt;div id="ljhkstfmhr" style="padding-left:0px;padding-right:0px;padding-top:10px;padding-bottom:10px;overflow-x:auto;overflow-y:auto;width:auto;height:auto;"&gt;</span></span>
<span><span class="co">#&gt; &lt;style&gt;#ljhkstfmhr table {</span></span>
<span><span class="co">#&gt; font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';</span></span>
<span><span class="co">#&gt; -webkit-font-smoothing: antialiased;</span></span>
<span><span class="co">#&gt; -moz-osx-font-smoothing: grayscale;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr thead, #ljhkstfmhr tbody, #ljhkstfmhr tfoot, #ljhkstfmhr tr, #ljhkstfmhr td, #ljhkstfmhr th {</span></span>
<span><span class="co">#&gt; border-style: none;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr p {</span></span>
<span><span class="co">#&gt; margin: 0;</span></span>
<span><span class="co">#&gt; padding: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_table {</span></span>
<span><span class="co">#&gt; display: table;</span></span>
<span><span class="co">#&gt; border-collapse: collapse;</span></span>
<span><span class="co">#&gt; line-height: normal;</span></span>
<span><span class="co">#&gt; margin-left: auto;</span></span>
<span><span class="co">#&gt; margin-right: auto;</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; font-size: 16px;</span></span>
<span><span class="co">#&gt; font-weight: normal;</span></span>
<span><span class="co">#&gt; font-style: normal;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; width: auto;</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; border-top-color: #A8A8A8;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 2px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #A8A8A8;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 2px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_caption {</span></span>
<span><span class="co">#&gt; padding-top: 4px;</span></span>
<span><span class="co">#&gt; padding-bottom: 4px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_title {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; font-size: 125%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; padding-top: 4px;</span></span>
<span><span class="co">#&gt; padding-bottom: 4px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; border-bottom-width: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_subtitle {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; font-size: 85%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; padding-top: 3px;</span></span>
<span><span class="co">#&gt; padding-bottom: 5px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; border-top-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; border-top-width: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_heading {</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; text-align: center;</span></span>
<span><span class="co">#&gt; border-bottom-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 1px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 1px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_bottom_border {</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_col_headings {</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 1px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 1px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_col_heading {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: normal;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 1px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 1px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; vertical-align: bottom;</span></span>
<span><span class="co">#&gt; padding-top: 5px;</span></span>
<span><span class="co">#&gt; padding-bottom: 6px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; overflow-x: hidden;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_column_spanner_outer {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: normal;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; padding-top: 0;</span></span>
<span><span class="co">#&gt; padding-bottom: 0;</span></span>
<span><span class="co">#&gt; padding-left: 4px;</span></span>
<span><span class="co">#&gt; padding-right: 4px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_column_spanner_outer:first-child {</span></span>
<span><span class="co">#&gt; padding-left: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_column_spanner_outer:last-child {</span></span>
<span><span class="co">#&gt; padding-right: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_column_spanner {</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; vertical-align: bottom;</span></span>
<span><span class="co">#&gt; padding-top: 5px;</span></span>
<span><span class="co">#&gt; padding-bottom: 5px;</span></span>
<span><span class="co">#&gt; overflow-x: hidden;</span></span>
<span><span class="co">#&gt; display: inline-block;</span></span>
<span><span class="co">#&gt; width: 100%;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_spanner_row {</span></span>
<span><span class="co">#&gt; border-bottom-style: hidden;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_group_heading {</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 1px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 1px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; vertical-align: middle;</span></span>
<span><span class="co">#&gt; text-align: left;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_empty_group_heading {</span></span>
<span><span class="co">#&gt; padding: 0.5px;</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; vertical-align: middle;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_from_md &gt; :first-child {</span></span>
<span><span class="co">#&gt; margin-top: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_from_md &gt; :last-child {</span></span>
<span><span class="co">#&gt; margin-bottom: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_row {</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; margin: 10px;</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 1px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 1px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 1px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; vertical-align: middle;</span></span>
<span><span class="co">#&gt; overflow-x: hidden;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_stub {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; border-right-style: solid;</span></span>
<span><span class="co">#&gt; border-right-width: 2px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_stub_row_group {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; font-weight: initial;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; border-right-style: solid;</span></span>
<span><span class="co">#&gt; border-right-width: 2px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; vertical-align: top;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_row_group_first td {</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_row_group_first th {</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_summary_row {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_first_summary_row {</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_first_summary_row.thick {</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_last_summary_row {</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_grand_summary_row {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; text-transform: inherit;</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_first_grand_summary_row {</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; border-top-style: double;</span></span>
<span><span class="co">#&gt; border-top-width: 6px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_last_grand_summary_row_top {</span></span>
<span><span class="co">#&gt; padding-top: 8px;</span></span>
<span><span class="co">#&gt; padding-bottom: 8px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; border-bottom-style: double;</span></span>
<span><span class="co">#&gt; border-bottom-width: 6px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_striped {</span></span>
<span><span class="co">#&gt; background-color: rgba(128, 128, 128, 0.05);</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_table_body {</span></span>
<span><span class="co">#&gt; border-top-style: solid;</span></span>
<span><span class="co">#&gt; border-top-width: 2px;</span></span>
<span><span class="co">#&gt; border-top-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-bottom-style: solid;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_footnotes {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; border-bottom-style: none;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 2px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 2px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_footnote {</span></span>
<span><span class="co">#&gt; margin: 0px;</span></span>
<span><span class="co">#&gt; font-size: 90%;</span></span>
<span><span class="co">#&gt; padding-top: 4px;</span></span>
<span><span class="co">#&gt; padding-bottom: 4px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_sourcenotes {</span></span>
<span><span class="co">#&gt; color: #333333;</span></span>
<span><span class="co">#&gt; background-color: #FFFFFF;</span></span>
<span><span class="co">#&gt; border-bottom-style: none;</span></span>
<span><span class="co">#&gt; border-bottom-width: 2px;</span></span>
<span><span class="co">#&gt; border-bottom-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-left-style: none;</span></span>
<span><span class="co">#&gt; border-left-width: 2px;</span></span>
<span><span class="co">#&gt; border-left-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; border-right-style: none;</span></span>
<span><span class="co">#&gt; border-right-width: 2px;</span></span>
<span><span class="co">#&gt; border-right-color: #D3D3D3;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_sourcenote {</span></span>
<span><span class="co">#&gt; font-size: 90%;</span></span>
<span><span class="co">#&gt; padding-top: 4px;</span></span>
<span><span class="co">#&gt; padding-bottom: 4px;</span></span>
<span><span class="co">#&gt; padding-left: 5px;</span></span>
<span><span class="co">#&gt; padding-right: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_left {</span></span>
<span><span class="co">#&gt; text-align: left;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_center {</span></span>
<span><span class="co">#&gt; text-align: center;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_right {</span></span>
<span><span class="co">#&gt; text-align: right;</span></span>
<span><span class="co">#&gt; font-variant-numeric: tabular-nums;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_font_normal {</span></span>
<span><span class="co">#&gt; font-weight: normal;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_font_bold {</span></span>
<span><span class="co">#&gt; font-weight: bold;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_font_italic {</span></span>
<span><span class="co">#&gt; font-style: italic;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_super {</span></span>
<span><span class="co">#&gt; font-size: 65%;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_footnote_marks {</span></span>
<span><span class="co">#&gt; font-size: 75%;</span></span>
<span><span class="co">#&gt; vertical-align: 0.4em;</span></span>
<span><span class="co">#&gt; position: initial;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_asterisk {</span></span>
<span><span class="co">#&gt; font-size: 100%;</span></span>
<span><span class="co">#&gt; vertical-align: 0;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_indent_1 {</span></span>
<span><span class="co">#&gt; text-indent: 5px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_indent_2 {</span></span>
<span><span class="co">#&gt; text-indent: 10px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_indent_3 {</span></span>
<span><span class="co">#&gt; text-indent: 15px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_indent_4 {</span></span>
<span><span class="co">#&gt; text-indent: 20px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #ljhkstfmhr .gt_indent_5 {</span></span>
<span><span class="co">#&gt; text-indent: 25px;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; &lt;/style&gt;</span></span>
<span><span class="co">#&gt; &lt;table class="gt_table" data-quarto-disable-processing="false" data-quarto-bootstrap="false"&gt;</span></span>
<span><span class="co">#&gt; &lt;thead&gt;</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; &lt;tr class="gt_col_headings"&gt;</span></span>
<span><span class="co">#&gt; &lt;th class="gt_col_heading gt_columns_bottom_border gt_left" rowspan="1" colspan="1" scope="col" id="&amp;lt;strong&amp;gt;Characteristic&amp;lt;/strong&amp;gt;"&gt;&lt;strong&gt;Characteristic&lt;/strong&gt;&lt;/th&gt;</span></span>
<span><span class="co">#&gt; &lt;th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="&amp;lt;strong&amp;gt;Overall&amp;lt;/strong&amp;gt;, N = 200&amp;lt;span class=&amp;quot;gt_footnote_marks&amp;quot; style=&amp;quot;white-space:nowrap;font-style:italic;font-weight:normal;&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&amp;lt;/span&amp;gt;"&gt;&lt;strong&gt;Overall&lt;/strong&gt;, N = 200&lt;span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/span&gt;&lt;/th&gt;</span></span>
<span><span class="co">#&gt; &lt;th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="&amp;lt;strong&amp;gt;Active&amp;lt;/strong&amp;gt;, N = 79&amp;lt;span class=&amp;quot;gt_footnote_marks&amp;quot; style=&amp;quot;white-space:nowrap;font-style:italic;font-weight:normal;&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&amp;lt;/span&amp;gt;"&gt;&lt;strong&gt;Active&lt;/strong&gt;, N = 79&lt;span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/span&gt;&lt;/th&gt;</span></span>
<span><span class="co">#&gt; &lt;th class="gt_col_heading gt_columns_bottom_border gt_center" rowspan="1" colspan="1" scope="col" id="&amp;lt;strong&amp;gt;Placebo&amp;lt;/strong&amp;gt;, N = 121&amp;lt;span class=&amp;quot;gt_footnote_marks&amp;quot; style=&amp;quot;white-space:nowrap;font-style:italic;font-weight:normal;&amp;quot;&amp;gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;&amp;lt;/span&amp;gt;"&gt;&lt;strong&gt;Placebo&lt;/strong&gt;, N = 121&lt;span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/span&gt;&lt;/th&gt;</span></span>
<span><span class="co">#&gt; &lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;/thead&gt;</span></span>
<span><span class="co">#&gt; &lt;tbody class="gt_table_body"&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;&lt;td headers="label" class="gt_row gt_left"&gt;hypertension&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_0" class="gt_row gt_center"&gt;101 (51%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_1" class="gt_row gt_center"&gt;38 (48%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_2" class="gt_row gt_center"&gt;63 (52%)&lt;/td&gt;&lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;&lt;td headers="label" class="gt_row gt_left"&gt;diabetes&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_0" class="gt_row gt_center"&gt;23 (12%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_1" class="gt_row gt_center"&gt;9 (11%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_2" class="gt_row gt_center"&gt;14 (12%)&lt;/td&gt;&lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;&lt;td headers="label" class="gt_row gt_left"&gt;civil&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_0" class="gt_row gt_center"&gt;&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_1" class="gt_row gt_center"&gt;&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_2" class="gt_row gt_center"&gt;&lt;/td&gt;&lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;&lt;td headers="label" class="gt_row gt_left"&gt;    alone&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_0" class="gt_row gt_center"&gt;59 (30%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_1" class="gt_row gt_center"&gt;22 (28%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_2" class="gt_row gt_center"&gt;37 (31%)&lt;/td&gt;&lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;&lt;td headers="label" class="gt_row gt_left"&gt;    partner&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_0" class="gt_row gt_center"&gt;141 (71%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_1" class="gt_row gt_center"&gt;57 (72%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;td headers="stat_2" class="gt_row gt_center"&gt;84 (69%)&lt;/td&gt;&lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;/tbody&gt;</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; &lt;tfoot class="gt_footnotes"&gt;</span></span>
<span><span class="co">#&gt; &lt;tr&gt;</span></span>
<span><span class="co">#&gt; &lt;td class="gt_footnote" colspan="4"&gt;&lt;span class="gt_footnote_marks" style="white-space:nowrap;font-style:italic;font-weight:normal;"&gt;&lt;sup&gt;1&lt;/sup&gt;&lt;/span&gt; n (%)&lt;/td&gt;</span></span>
<span><span class="co">#&gt; &lt;/tr&gt;</span></span>
<span><span class="co">#&gt; &lt;/tfoot&gt;</span></span>
<span><span class="co">#&gt; &lt;/table&gt;</span></span>
<span><span class="co">#&gt; &lt;/div&gt;</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; $`Figure 1`</span></span></code></pre></div>
<p><img src="toolbox_files/figure-html/generic_stroke-example-1.png" width="700"></p>
<pre><code><span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; $`Figure 2`</span></span></code></pre>
<p><img src="toolbox_files/figure-html/generic_stroke-example-2.png" width="700"></p>
</div>
<div class="section level4">
<h4 id="index_plot">index_plot()<a class="anchor" aria-label="anchor" href="#index_plot"></a>
</h4>
<p>Used for plotting scores from a multi dimensional patient test.</p>
<div class="sourceCode" id="cb9"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/index_plot.html">index_plot</a></span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="../reference/score.html">score</a></span><span class="op">[</span><span class="va">score</span><span class="op">$</span><span class="va">event</span> <span class="op">==</span> <span class="st">"A"</span>, <span class="op">]</span><span class="op">)</span></span></code></pre></div>
<p><img src="toolbox_files/figure-html/index_plot-example-1.png" width="700"></p>
</div>
<div class="section level4">
<h4 id="win_prob">win_prob()<a class="anchor" aria-label="anchor" href="#win_prob"></a>
</h4>
<p>The <code><a href="../reference/win_prob.html">win_prob()</a></code> is an implementation of the Tournament
Method for calculating the probability of winning as suggested by <a href="https://doi.org/10.1161/STROKEAHA.121.037744" class="external-link">Zou et al 2022</a>.
The authors has included a spreadsheet as supplementary materials. This
function aims to mimic that functionality. The function also includes a
<code><a href="https://rdrr.io/r/base/print.html" class="external-link">print()</a></code> extension for nice printing.</p>
<div class="sourceCode" id="cb10"><pre class="downlit sourceCode r">
<code class="sourceCode R"><span><span class="fu"><a href="../reference/win_prob.html">win_prob</a></span><span class="op">(</span></span>
<span> data <span class="op">=</span> <span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="../reference/talos.html">talos</a></span>,</span>
<span> response <span class="op">=</span> <span class="st">"mrs_6"</span>,</span>
<span> group <span class="op">=</span> <span class="st">"rtreat"</span>,</span>
<span> sample.size <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> print.tables <span class="op">=</span> <span class="cn">TRUE</span></span>
<span><span class="op">)</span></span>
<span><span class="co">#&gt; Zou et al's winP (doi: 10.1161/STROKEAHA.121.037744) </span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; Probability of a random observation in Placebo group </span></span>
<span><span class="co">#&gt; will have a higher response score than a random</span></span>
<span><span class="co">#&gt; observation in Active group:</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; winP: 0.400 (0.612, 0.372) p=0.0125</span></span>
<span><span class="co">#&gt; --------------------------------------------</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; The numbers needed to treat (NNT) are: -9</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; --------------------------------------------</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; With Active/Placebo ratio = 1 and beta = 0.2</span></span>
<span><span class="co">#&gt; the sample size needed is: 238</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; --------------------------------------------</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; Results for the Active group:</span></span>
<span><span class="co">#&gt; |mrs_6 | Freq| prop| overall_rank| rank| win_frac|</span></span>
<span><span class="co">#&gt; |:-----|----:|-----:|------------:|----:|--------:|</span></span>
<span><span class="co">#&gt; |0 | 14| 0.177| 175.0| 72.5| 0.847|</span></span>
<span><span class="co">#&gt; |1 | 29| 0.367| 113.5| 51.0| 0.517|</span></span>
<span><span class="co">#&gt; |2 | 22| 0.278| 49.0| 25.5| 0.194|</span></span>
<span><span class="co">#&gt; |3 | 9| 0.114| 15.0| 10.0| 0.041|</span></span>
<span><span class="co">#&gt; |4 | 3| 0.038| 7.0| 4.0| 0.025|</span></span>
<span><span class="co">#&gt; |6 | 2| 0.025| 2.5| 1.5| 0.008|</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; Results for the Placebo group:</span></span>
<span><span class="co">#&gt; |mrs_6 | Freq| prop| overall_rank| rank| win_frac|</span></span>
<span><span class="co">#&gt; |:-----|----:|-----:|------------:|-----:|--------:|</span></span>
<span><span class="co">#&gt; |0 | 37| 0.306| 175.0| 103.0| 0.911|</span></span>
<span><span class="co">#&gt; |1 | 43| 0.355| 113.5| 63.0| 0.639|</span></span>
<span><span class="co">#&gt; |2 | 35| 0.289| 49.0| 24.0| 0.316|</span></span>
<span><span class="co">#&gt; |3 | 2| 0.017| 15.0| 5.5| 0.120|</span></span>
<span><span class="co">#&gt; |4 | 2| 0.017| 7.0| 3.5| 0.044|</span></span>
<span><span class="co">#&gt; |6 | 2| 0.017| 2.5| 1.5| 0.013|</span></span></code></pre></div>
</div>
</div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

96
authors.html Normal file
View File

@ -0,0 +1,96 @@
<!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>Authors and Citation • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Authors and Citation"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-citation-authors">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="logo.png" class="logo" alt=""><h1>Authors and Citation</h1>
</div>
<div class="section level2 citation">
<h2>Authors</h2>
<ul class="list-unstyled"><li>
<p><strong>Andreas Gammelgaard Damsbo</strong>. Author, maintainer. <a href="https://orcid.org/0000-0002-7559-1154" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a>
</p>
</li>
</ul></div>
<div class="section level2 citation">
<h2 id="citation">Citation</h2>
<p><small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/DESCRIPTION" class="external-link"><code>DESCRIPTION</code></a></small></p>
<p>Damsbo A (2023).
<em>stRoke: Clinical Stroke Research</em>.
https://agdamsbo.github.io/stRoke/, https://github.com/agdamsbo/stRoke.
</p>
<pre>@Manual{,
title = {stRoke: Clinical Stroke Research},
author = {Andreas Gammelgaard Damsbo},
year = {2023},
note = {https://agdamsbo.github.io/stRoke/, https://github.com/agdamsbo/stRoke},
}</pre>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

4
deps/data-deps.txt vendored Normal file
View File

@ -0,0 +1,4 @@
<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.2.2/bootstrap.min.css" rel="stylesheet" />
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script>

10881
deps/jquery-3.6.0/jquery-3.6.0.js vendored Normal file

File diff suppressed because it is too large Load Diff

2
deps/jquery-3.6.0/jquery-3.6.0.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
favicon-16x16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
favicon-32x32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

180
index.html Normal file
View File

@ -0,0 +1,180 @@
<!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">
<meta name="description" content="This is an R-toolbox of custom functions for convenient data management
and analysis in clinical health research and teaching.
The package is mainly collected for personal use, but any use beyond that is encouraged.
This package has migrated functions from agdamsbo/daDoctoR, and new functions has been added.
Version follows months and year. See NEWS/Changelog for release notes.
This package includes sampled data from the TALOS trial (Kraglund et al (2018) &lt;doi:10.1161/STROKEAHA.117.020067&gt;).
The win_prob() function is based on work by Zou et al (2022) &lt;doi:10.1161/STROKEAHA.121.037744&gt;.
The age_calc() function is based on work by Becker (2020) &lt;doi:10.18637/jss.v093.i02&gt;.">
<title>Clinical Stroke Research • stRoke</title>
<!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="60x60" href="apple-touch-icon-60x60.png">
<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.2.2/bootstrap.min.css" rel="stylesheet">
<script src="deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous">
<!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="pkgdown.js"></script><meta property="og:title" content="Clinical Stroke Research">
<meta property="og:description" content="This is an R-toolbox of custom functions for convenient data management
and analysis in clinical health research and teaching.
The package is mainly collected for personal use, but any use beyond that is encouraged.
This package has migrated functions from agdamsbo/daDoctoR, and new functions has been added.
Version follows months and year. See NEWS/Changelog for release notes.
This package includes sampled data from the TALOS trial (Kraglund et al (2018) &lt;doi:10.1161/STROKEAHA.117.020067&gt;).
The win_prob() function is based on work by Zou et al (2022) &lt;doi:10.1161/STROKEAHA.121.037744&gt;.
The age_calc() function is based on work by Becker (2020) &lt;doi:10.18637/jss.v093.i02&gt;.">
<meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png">
<!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]-->
</head>
<body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="news/index.html">Changelog</a>
</li>
</ul>
<form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="search.json" id="search-input" placeholder="Search for" autocomplete="off">
</form>
<ul class="navbar-nav">
<li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul>
</div>
</div>
</nav><div class="container template-home">
<div class="row">
<main id="main" class="col-md-9">
<div class="section level1">
<div class="page-header">
<img src="logo.png" class="logo" alt=""><h1 id="stroke-package-">stRoke package <a class="anchor" aria-label="anchor" href="#stroke-package-"></a>
</h1>
</div>
<p>This is an R-toolbox of custom functions for convenient data management and analysis in clinical health research and teaching. The package is mainly collected for personal use, but any use beyond that is encouraged. This package has migrated functions from the agdamsbo/daDoctoR-package, and new functions has been added.</p>
<div class="section level2">
<h2 id="contribute">Contribute<a class="anchor" aria-label="anchor" href="#contribute"></a>
</h2>
<p>This package is <a href="https://github.com/agdamsbo/stRoke" class="external-link">shared on GitHub</a>, and you are very welcome to contribute by opening an issue or a pull request.</p>
</div>
</div>
<div class="section level1">
<h1 id="installation">Installation<a class="anchor" aria-label="anchor" href="#installation"></a>
</h1>
<p>The package can be installed directly from CRAN:</p>
<pre><code><span><span class="fu"><a href="https://rdrr.io/r/utils/install.packages.html" class="external-link">install.packages</a></span><span class="op">(</span><span class="st">"stRoke"</span><span class="op">)</span></span></code></pre>
<p>The latest version in development can be installed from GitHub:</p>
<pre><code><span><span class="fu">remotes</span><span class="fu">::</span><span class="fu"><a href="https://remotes.r-lib.org/reference/install_github.html" class="external-link">install_github</a></span><span class="op">(</span><span class="st">"agdamsbo/stRoke"</span><span class="op">)</span></span></code></pre>
</div>
</main><aside class="col-md-3"><div class="links">
<h2 data-toc-skip>Links</h2>
<ul class="list-unstyled">
<li><a href="https://cloud.r-project.org/package=stRoke" class="external-link">View on CRAN</a></li>
<li><a href="https://github.com/agdamsbo/stRoke/" class="external-link">Browse source code</a></li>
<li><a href="https://github.com/agdamsbo/stRoke/issues" class="external-link">Report a bug</a></li>
</ul>
</div>
<div class="license">
<h2 data-toc-skip>License</h2>
<ul class="list-unstyled">
<li><a href="https://www.r-project.org/Licenses/GPL-3" class="external-link">GPL-3</a></li>
</ul>
</div>
<div class="citation">
<h2 data-toc-skip>Citation</h2>
<ul class="list-unstyled">
<li><a href="authors.html#citation">Citing stRoke</a></li>
</ul>
</div>
<div class="developers">
<h2 data-toc-skip>Developers</h2>
<ul class="list-unstyled">
<li>Andreas Gammelgaard Damsbo <br><small class="roles"> Author, maintainer </small> <a href="https://orcid.org/0000-0002-7559-1154" target="orcid.widget" aria-label="ORCID" class="external-link"><span class="fab fa-orcid orcid" aria-hidden="true"></span></a> </li>
</ul>
</div>
<div class="dev-status">
<h2 data-toc-skip>Dev status</h2>
<ul class="list-unstyled">
<li><a href="https://github.com/agdamsbo/stRoke" class="external-link"><img src="https://img.shields.io/github/r-package/v/agdamsbo/stRoke" alt="GitHub R package version"></a></li>
<li><a href="https://CRAN.R-project.org/package=stRoke" class="external-link"><img src="https://img.shields.io/cran/v/stRoke" alt="CRAN/METACRAN"></a></li>
<li><a href="https://doi.org/10.5281/zenodo.8013981" class="external-link"><img src="https://zenodo.org/badge/DOI/10.5281/zenodo.8013981.svg" alt="DOI"></a></li>
<li><a href="https://github.com/agdamsbo/stRoke/actions/workflows/R-CMD-check.yaml" class="external-link"><img src="https://github.com/agdamsbo/stRoke/actions/workflows/R-CMD-check.yaml/badge.svg" alt="Github Actions"></a></li>
<li><a href="https://github.com/agdamsbo/stRoke/actions/workflows/pages/pages-build-deployment" class="external-link"><img src="https://github.com/agdamsbo/stRoke/actions/workflows/pages/pages-build-deployment/badge.svg" alt="Page deployed"></a></li>
<li><a href="https://app.codecov.io/gh/agdamsbo/stRoke?branch=main" class="external-link"><img src="https://codecov.io/gh/agdamsbo/stRoke/branch/main/graph/badge.svg" alt="Codecov test coverage"></a></li>
<li><a href="https://cran.r-project.org/package=stRoke" class="external-link"><img src="https://cranlogs.r-pkg.org/badges/grand-total/stRoke" alt="CRAN downloads"></a></li>
<li><a href="https://github.com/agdamsbo/stRoke/actions/workflows/R-CMD-check.yaml" class="external-link"><img src="https://github.com/agdamsbo/stRoke/actions/workflows/R-CMD-check.yaml/badge.svg" alt="R-CMD-check"></a></li>
</ul>
</div>
</aside>
</div>
<footer><div class="pkgdown-footer-left">
<p></p>
<p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p>
<p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer>
</div>
</body>
</html>

12
link.svg Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve">
<style type="text/css">
.st0{fill:#75AADB;}
</style>
<path class="st0" d="M4,11.3h1.3v1.3H4c-2,0-4-2.3-4-4.7s2.1-4.7,4-4.7h5.3c1.9,0,4,2.3,4,4.7c0,1.9-1.2,3.6-2.7,4.3v-1.5
C11.4,10.2,12,9.1,12,8c0-1.7-1.4-3.3-2.7-3.3H4C2.7,4.7,1.3,6.3,1.3,8S2.7,11.3,4,11.3z M16,7.3h-1.3v1.3H16c1.3,0,2.7,1.6,2.7,3.3
s-1.4,3.3-2.7,3.3h-5.3C9.4,15.3,8,13.7,8,12c0-1.1,0.6-2.2,1.3-2.8V7.7C7.9,8.4,6.7,10.1,6.7,12c0,2.4,2.1,4.7,4,4.7H16
c1.9,0,4-2.3,4-4.7S18,7.3,16,7.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 810 B

BIN
logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

201
news/index.html Normal file
View File

@ -0,0 +1,201 @@
<!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>Changelog • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Changelog"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="active nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-news">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.png" class="logo" alt=""><h1>Changelog</h1>
<small>Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/NEWS.md" class="external-link"><code>NEWS.md</code></a></small>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.6.1" id="stroke-2361">stRoke 23.6.1<a class="anchor" aria-label="anchor" href="#stroke-2361"></a></h2>
<div class="section level4">
<h4 id="functions-23-6-1">Functions:<a class="anchor" aria-label="anchor" href="#functions-23-6-1"></a></h4>
<ul><li>NEW: color_plot() function implements the contrast_text() and is very much inspired from scales::show_col(). Passes arguments to the internal contrast_text(). Tests and all. Took way longer than intended.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.4.1" id="stroke-2341">stRoke 23.4.1<a class="anchor" aria-label="anchor" href="#stroke-2341"></a></h2><p class="text-muted">CRAN release: 2023-04-13</p>
<div class="section level4">
<h4 id="functions-23-4-1">Functions:<a class="anchor" aria-label="anchor" href="#functions-23-4-1"></a></h4>
<ul><li>NEW: ds2dd() creates a REDCap data dictionary based on a data set for easy upload. A new vignette will be provided for example use. A separate vignette has been added.</li>
</ul></div>
<div class="section level4">
<h4 id="notes-23-4-1">Notes:<a class="anchor" aria-label="anchor" href="#notes-23-4-1"></a></h4>
<ul><li>With newer additions to the package, these functions clearly has their potential use also outside stroke research.</li>
<li>A new vector with REDCap metadata headers has been added. Can be called with data(metadata_names).</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.1.8" id="stroke-2318">stRoke 23.1.8<a class="anchor" aria-label="anchor" href="#stroke-2318"></a></h2>
<div class="section level4">
<h4 id="functions-23-1-8">Functions:<a class="anchor" aria-label="anchor" href="#functions-23-1-8"></a></h4>
<ul><li>write_ical() is an easy to use implementation of the package <code><a href="https://rdrr.io/r/base/library.html" class="external-link">library(calendar)</a></code> for easy conversion of spreadsheets to ical object. Export an .ics file using <code><a href="https://rdrr.io/pkg/calendar/man/ic_write.html" class="external-link">calendar::ic_write()</a></code>.</li>
<li>contrast_text() calculates the best contrast text color for a given background color. For use in graphics.</li>
</ul></div>
<div class="section level4">
<h4 id="notes-23-1-8">Notes:<a class="anchor" aria-label="anchor" href="#notes-23-1-8"></a></h4>
<ul><li>This is the first update on CRAN.</li>
</ul></div>
<div class="section level4">
<h4 id="documentation-23-1-8">Documentation<a class="anchor" aria-label="anchor" href="#documentation-23-1-8"></a></h4>
<ul><li>Badges, lots of badges</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.1.7" id="stroke-2317">stRoke 23.1.7<a class="anchor" aria-label="anchor" href="#stroke-2317"></a></h2><p class="text-muted">CRAN release: 2023-01-24</p>
<div class="section level4">
<h4 id="notes-23-1-7">Notes:<a class="anchor" aria-label="anchor" href="#notes-23-1-7"></a></h4>
<ul><li>This is the version first published on CRAN as of 24.jan.2023.</li>
<li>This is also the version first published to zenodo.org, and with corresponding <a href="https://doi.org/10.5281/zenodo.7572023" class="external-link">doi: 10.5281/zenodo.7572023</a>.</li>
</ul></div>
<div class="section level4">
<h4 id="functions-23-1-7">Functions:<a class="anchor" aria-label="anchor" href="#functions-23-1-7"></a></h4>
<ul><li>redcap_read_tables() has been removed from the package for now. Looking to add it back later as a minimal data acquisition tool.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.1.6" id="stroke-2316---failed-due-to-dependencies">stRoke 23.1.6 - failed due to dependencies<a class="anchor" aria-label="anchor" href="#stroke-2316---failed-due-to-dependencies"></a></h2>
<div class="section level4">
<h4 id="new-attempt-at-cran-submission-23-1-6">New attempt at CRAN submission<a class="anchor" aria-label="anchor" href="#new-attempt-at-cran-submission-23-1-6"></a></h4>
</div>
<div class="section level4">
<h4 id="functions-23-1-6">Functions:<a class="anchor" aria-label="anchor" href="#functions-23-1-6"></a></h4>
<ul><li>win_prop() added to implement the suggested methods in <a href="https://doi.org/10.1161/STROKEAHA.121.037744" class="external-link">DOI: 10.1161/STROKEAHA.121.037744</a>, as an implementation of “Tournament Methods” also found in <code><a href="https://rdrr.io/r/base/library.html" class="external-link">library(genodds)</a></code>. The function is based on the spreadsheet provided by the authors. A print.win_Prop is also added for printing.</li>
</ul></div>
<div class="section level4">
<h4 id="notes-23-1-6">Notes:<a class="anchor" aria-label="anchor" href="#notes-23-1-6"></a></h4>
<ul><li>23.1.5 failed on CRAN due to gt_plot(). This function has been dropped. Find it as as_ggplot() elsewhere.</li>
<li>agdamsbo/REDCapRITS added as “Additional_repositories”.</li>
<li>Included references listed as authors.</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="23.1.5" id="stroke-2315">stRoke 23.1.5<a class="anchor" aria-label="anchor" href="#stroke-2315"></a></h2>
<div class="section level4">
<h4 id="release-on-cran---failed-23-1-5">RELEASE ON CRAN - failed<a class="anchor" aria-label="anchor" href="#release-on-cran---failed-23-1-5"></a></h4>
</div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.23.1.4" id="stroke-02314">stRoke 0.23.1.4<a class="anchor" aria-label="anchor" href="#stroke-02314"></a></h2>
<div class="section level4">
<h4 id="functions-0-23-1-4">Functions:<a class="anchor" aria-label="anchor" href="#functions-0-23-1-4"></a></h4>
<ul><li>plot_olr() has been deprecated and removed.</li>
<li>ci_plot() functionality extended to include logistic model plotting.</li>
<li>age_calc() use vapply() instead of sapply()</li>
<li>gt_plot() function added to plot gt elements as ggplots. From <a href="https://github.com/MSKCC-Epi-Bio/bstfun" class="external-link">bstfun</a>. Not all done and satisfied with the layout with patchwork.</li>
</ul></div>
<div class="section level4">
<h4 id="documentation-0-23-1-4">Documentation<a class="anchor" aria-label="anchor" href="#documentation-0-23-1-4"></a></h4>
<ul><li>Trying to complete all flags from goodpractice and inteRgrate</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.23.1.3" id="stroke-02313">stRoke 0.23.1.3<a class="anchor" aria-label="anchor" href="#stroke-02313"></a></h2>
<div class="section level4">
<h4 id="functions-0-23-1-3">Functions:<a class="anchor" aria-label="anchor" href="#functions-0-23-1-3"></a></h4>
<ul><li>files_filter() added. Simple function to get file names in path with specified filter.</li>
<li>updated cpr_dob to give warnings if format is not recognised and return NAs.</li>
<li>ci_plot() updated to actually handle binary factors. Uses glm(), not lm().</li>
</ul></div>
<div class="section level4">
<h4 id="documentation-0-23-1-3">Documentation:<a class="anchor" aria-label="anchor" href="#documentation-0-23-1-3"></a></h4>
<ul><li>test, test and tests to satisfy codecov and, of course, ensure higher quality</li>
<li>changes to comply with goodpractices::gp()</li>
</ul><p>…and probably some more.</p>
</div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.23.1.2" id="stroke-02312">stRoke 0.23.1.2<a class="anchor" aria-label="anchor" href="#stroke-02312"></a></h2>
<div class="section level4">
<h4 id="functions-0-23-1-2">Functions:<a class="anchor" aria-label="anchor" href="#functions-0-23-1-2"></a></h4>
<ul><li>cpr_dob() now includes <code>format=</code>.</li>
<li>Other minor updates.</li>
</ul></div>
<div class="section level4">
<h4 id="documentation-0-23-1-2">Documentation:<a class="anchor" aria-label="anchor" href="#documentation-0-23-1-2"></a></h4>
<ul><li>Two new vignettes</li>
<li>Taking last steps in documenting before releasing on CRAN</li>
</ul></div>
<div class="section level4">
<h4 id="other-0-23-1-2">Other:<a class="anchor" aria-label="anchor" href="#other-0-23-1-2"></a></h4>
<ul><li>New hex logo</li>
</ul></div>
</div>
<div class="section level2">
<h2 class="pkg-version" data-toc-text="0.23.1.1" id="stroke-02311">stRoke 0.23.1.1<a class="anchor" aria-label="anchor" href="#stroke-02311"></a></h2>
<div class="section level4">
<h4 id="functions-0-23-1-1">Functions:<a class="anchor" aria-label="anchor" href="#functions-0-23-1-1"></a></h4>
<ul><li>age_calc() now also outputs a numeric vector for units=“days”, and not a character vector as difftime() would.</li>
</ul></div>
<div class="section level4">
<h4 id="documentation-0-23-1-1">Documentation:<a class="anchor" aria-label="anchor" href="#documentation-0-23-1-1"></a></h4>
<ul><li>Added a <code>NEWS.md</code> file to track changes to the package.</li>
<li>Added codecov</li>
<li>Added tests with the help of gpttools</li>
</ul></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

156
pkgdown.js Normal file
View File

@ -0,0 +1,156 @@
/* http://gregfranko.com/blog/jquery-best-practices/ */
(function($) {
$(function() {
$('nav.navbar').headroom();
Toc.init({
$nav: $("#toc"),
$scope: $("main h2, main h3, main h4, main h5, main h6")
});
if ($('#toc').length) {
$('body').scrollspy({
target: '#toc',
offset: $("nav.navbar").outerHeight() + 1
});
}
// Activate popovers
$('[data-bs-toggle="popover"]').popover({
container: 'body',
html: true,
trigger: 'focus',
placement: "top",
sanitize: false,
});
$('[data-bs-toggle="tooltip"]').tooltip();
/* Clipboard --------------------------*/
function changeTooltipMessage(element, msg) {
var tooltipOriginalTitle=element.getAttribute('data-original-title');
element.setAttribute('data-original-title', msg);
$(element).tooltip('show');
element.setAttribute('data-original-title', tooltipOriginalTitle);
}
if(ClipboardJS.isSupported()) {
$(document).ready(function() {
var copyButton = "<button type='button' class='btn btn-primary btn-copy-ex' title='Copy to clipboard' aria-label='Copy to clipboard' data-toggle='tooltip' data-placement='left' data-trigger='hover' data-clipboard-copy><i class='fa fa-copy'></i></button>";
$("div.sourceCode").addClass("hasCopyButton");
// Insert copy buttons:
$(copyButton).prependTo(".hasCopyButton");
// Initialize tooltips:
$('.btn-copy-ex').tooltip({container: 'body'});
// Initialize clipboard:
var clipboard = new ClipboardJS('[data-clipboard-copy]', {
text: function(trigger) {
return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, "");
}
});
clipboard.on('success', function(e) {
changeTooltipMessage(e.trigger, 'Copied!');
e.clearSelection();
});
clipboard.on('error', function() {
changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy');
});
});
}
/* Search marking --------------------------*/
var url = new URL(window.location.href);
var toMark = url.searchParams.get("q");
var mark = new Mark("main#main");
if (toMark) {
mark.mark(toMark, {
accuracy: {
value: "complementary",
limiters: [",", ".", ":", "/"],
}
});
}
/* Search --------------------------*/
/* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */
// Initialise search index on focus
var fuse;
$("#search-input").focus(async function(e) {
if (fuse) {
return;
}
$(e.target).addClass("loading");
var response = await fetch($("#search-input").data("search-index"));
var data = await response.json();
var options = {
keys: ["what", "text", "code"],
ignoreLocation: true,
threshold: 0.1,
includeMatches: true,
includeScore: true,
};
fuse = new Fuse(data, options);
$(e.target).removeClass("loading");
});
// Use algolia autocomplete
var options = {
autoselect: true,
debug: true,
hint: false,
minLength: 2,
};
var q;
async function searchFuse(query, callback) {
await fuse;
var items;
if (!fuse) {
items = [];
} else {
q = query;
var results = fuse.search(query, { limit: 20 });
items = results
.filter((x) => x.score <= 0.75)
.map((x) => x.item);
if (items.length === 0) {
items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}];
}
}
callback(items);
}
$("#search-input").autocomplete(options, [
{
name: "content",
source: searchFuse,
templates: {
suggestion: (s) => {
if (s.title == s.what) {
return `${s.dir} > <div class="search-details"> ${s.title}</div>`;
} else if (s.previous_headings == "") {
return `${s.dir} > <div class="search-details"> ${s.title}</div> > ${s.what}`;
} else {
return `${s.dir} > <div class="search-details"> ${s.title}</div> > ${s.previous_headings} > ${s.what}`;
}
},
},
},
]).on('autocomplete:selected', function(event, s) {
window.location.href = s.path + "?q=" + q + "#" + s.id;
});
});
})(window.jQuery || window.$)

11
pkgdown.yml Normal file
View File

@ -0,0 +1,11 @@
pandoc: 2.19.2
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
ds2dd: ds2dd.html
toolbox: toolbox.html
last_built: 2023-06-30T08:04Z
urls:
reference: https://agdamsbo.github.io/stRoke/reference
article: https://agdamsbo.github.io/stRoke/articles

BIN
reference/Rplot001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 B

126
reference/age_calc.html Normal file
View File

@ -0,0 +1,126 @@
<!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"><meta name="description" content="Calculate age in years, months, or days"><title>Calculate age in years, months, or days — age_calc • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculate age in years, months, or days — age_calc"><meta property="og:description" content="Calculate age in years, months, or days"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Calculate age in years, months, or days</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/age_calc.R" class="external-link"><code>R/age_calc.R</code></a></small>
<div class="d-none name"><code>age_calc.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Calculate age in years, months, or days</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">age_calc</span><span class="op">(</span><span class="va">dob</span>, enddate <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/Sys.time.html" class="external-link">Sys.Date</a></span><span class="op">(</span><span class="op">)</span>, units <span class="op">=</span> <span class="st">"years"</span>, precise <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p><a href="https://doi.org/10.18637/jss.v093.i02" class="external-link">doi:10.18637/jss.v093.i02</a></p>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
<dl><dt>dob</dt>
<dd><p>Date of birth</p></dd>
<dt>enddate</dt>
<dd><p>End date for age calculation (default is Sys.Date())</p></dd>
<dt>units</dt>
<dd><p>Units for age calculation (default is "years").
Can be c("days", "months", "years")</p></dd>
<dt>precise</dt>
<dd><p>Option to calculate age precisely (default is TRUE)</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>numeric vector length 1</p>
</div>
<div class="section level2">
<h2 id="references">References<a class="anchor" aria-label="anchor" href="#references"></a></h2>
<p>Becker, J.P. (2020). eeptools: An R Package for Teaching and Learning
Ecology and Evolutionary Biology. Journal of Statistical Software,
93(2), 1-27.</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/Round.html" class="external-link">trunc</a></span><span class="op">(</span><span class="fu">age_calc</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"1945-10-23"</span><span class="op">)</span>,<span class="fu"><a href="https://rdrr.io/r/base/as.Date.html" class="external-link">as.Date</a></span><span class="op">(</span><span class="st">"2018-09-30"</span><span class="op">)</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 72</span>
<span class="r-in"><span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

BIN
reference/ci_plot-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

155
reference/ci_plot.html Normal file
View File

@ -0,0 +1,155 @@
<!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"><meta name="description" content='Horizontal forest plot of point estimate with confidence intervals.
Includes dichotomous or olr, depending on number of levels in "x".
Title and axis labels can be added to the ggplot afterwards.'><title>Confidence interval plot with point estimate — ci_plot • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Confidence interval plot with point estimate — ci_plot"><meta property="og:description" content='Horizontal forest plot of point estimate with confidence intervals.
Includes dichotomous or olr, depending on number of levels in "x".
Title and axis labels can be added to the ggplot afterwards.'><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Confidence interval plot with point estimate</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/ci_plot.R" class="external-link"><code>R/ci_plot.R</code></a></small>
<div class="d-none name"><code>ci_plot.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Horizontal forest plot of point estimate with confidence intervals.
Includes dichotomous or olr, depending on number of levels in "x".
Title and axis labels can be added to the ggplot afterwards.</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">ci_plot</span><span class="op">(</span></span>
<span> <span class="va">ds</span>,</span>
<span> x <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> y <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> vars <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> dec <span class="op">=</span> <span class="fl">3</span>,</span>
<span> lbls <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> title <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> method <span class="op">=</span> <span class="st">"auto"</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>ds</dt>
<dd><p>main input, either data set or logistic model</p></dd>
<dt>x</dt>
<dd><p>text string of main exposure variable</p></dd>
<dt>y</dt>
<dd><p>text string of outcome variable</p></dd>
<dt>vars</dt>
<dd><p>variables for multivariate analysis.</p></dd>
<dt>dec</dt>
<dd><p>Decimals in labels</p></dd>
<dt>lbls</dt>
<dd><p>Labels for variable names</p></dd>
<dt>title</dt>
<dd><p>Plot title. Can be specified later.</p></dd>
<dt>method</dt>
<dd><p>Character vector. The method for the regression.
Can be c("auto", "model").</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>ggplot element</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Auto plot</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">talos</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">talos</span><span class="op">[</span>,<span class="st">"mrs_1"</span><span class="op">]</span><span class="op">&lt;-</span><span class="fu"><a href="https://rdrr.io/r/base/factor.html" class="external-link">factor</a></span><span class="op">(</span><span class="va">talos</span><span class="op">[</span>,<span class="st">"mrs_1"</span><span class="op">]</span>,ordered<span class="op">=</span><span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">ci_plot</span><span class="op">(</span>ds <span class="op">=</span> <span class="va">talos</span>, x <span class="op">=</span> <span class="st">"rtreat"</span>, y <span class="op">=</span> <span class="st">"mrs_1"</span>, </span></span>
<span class="r-in"><span>vars <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"hypertension"</span>,<span class="st">"diabetes"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> Waiting for profiling to be done...</span>
<span class="r-plt img"><img src="ci_plot-1.png" alt="" width="700" height="433"></span>
<span class="r-in"><span><span class="co">## Model plot</span></span></span>
<span class="r-in"><span><span class="co"># iris$ord&lt;-factor(sample(1:3,size=nrow(iris),replace=TRUE),ordered=TRUE)</span></span></span>
<span class="r-in"><span><span class="co"># lm &lt;- MASS::polr(ord~., data=iris, Hess=TRUE, method="logistic")</span></span></span>
<span class="r-in"><span><span class="co"># ci_plot(ds = lm, method="model")</span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

BIN
reference/color_plot-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

137
reference/color_plot.html Normal file
View File

@ -0,0 +1,137 @@
<!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"><meta name="description" content="Plots color examples with contrasting text. Parameters are passed to
contrast_text."><title>Plot color examples with contrasting text — color_plot • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot color examples with contrasting text — color_plot"><meta property="og:description" content="Plots color examples with contrasting text. Parameters are passed to
contrast_text."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Plot color examples with contrasting text</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/contrast_text.R" class="external-link"><code>R/contrast_text.R</code></a></small>
<div class="d-none name"><code>color_plot.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Plots color examples with contrasting text. Parameters are passed to
contrast_text.</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">color_plot</span><span class="op">(</span></span>
<span> <span class="va">colors</span>,</span>
<span> labels <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> borders <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> cex_label <span class="op">=</span> <span class="fl">1</span>,</span>
<span> ncol <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> <span class="va">...</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>colors</dt>
<dd><p>Vector of colors to plot</p></dd>
<dt>labels</dt>
<dd><p>Show color names. Default is TRUE</p></dd>
<dt>borders</dt>
<dd><p>Border parameter for 'rect()' function. Default is NULL</p></dd>
<dt>cex_label</dt>
<dd><p>Label size. Default is 1.</p></dd>
<dt>ncol</dt>
<dd><p>Desired number of columns. Default is ceiling of square root to
the length of 'colors' vector provided.</p></dd>
<dt>...</dt>
<dd><p>Parameters for the</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>base plot</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/graphics/par.html" class="external-link">par</a></span><span class="op">(</span>bg<span class="op">=</span><span class="cn">NULL</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> named list()</span>
<span class="r-in"><span><span class="va">colors</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/grDevices/colors.html" class="external-link">colors</a></span><span class="op">(</span><span class="op">)</span>,size <span class="op">=</span> <span class="fl">20</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">color_plot</span><span class="op">(</span><span class="va">colors</span>, method<span class="op">=</span><span class="st">"relative"</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="color_plot-1.png" alt="" width="700" height="433"></span>
<span class="r-in"><span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

View File

@ -0,0 +1,148 @@
<!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"><meta name="description" content="Calculates the best contrast text color for a given
background color."><title>Contrast Text Color — contrast_text • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Contrast Text Color — contrast_text"><meta property="og:description" content="Calculates the best contrast text color for a given
background color."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Contrast Text Color</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/contrast_text.R" class="external-link"><code>R/contrast_text.R</code></a></small>
<div class="d-none name"><code>contrast_text.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Calculates the best contrast text color for a given
background color.</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">contrast_text</span><span class="op">(</span></span>
<span> <span class="va">background</span>,</span>
<span> light_text <span class="op">=</span> <span class="st">"white"</span>,</span>
<span> dark_text <span class="op">=</span> <span class="st">"black"</span>,</span>
<span> threshold <span class="op">=</span> <span class="fl">0.5</span>,</span>
<span> method <span class="op">=</span> <span class="st">"perceived_2"</span>,</span>
<span> <span class="va">...</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>background</dt>
<dd><p>A hex/named color value that represents the background.</p></dd>
<dt>light_text</dt>
<dd><p>A hex/named color value that represents the light text
color.</p></dd>
<dt>dark_text</dt>
<dd><p>A hex/named color value that represents the dark text color.</p></dd>
<dt>threshold</dt>
<dd><p>A numeric value between 0 and 1 that is used to determine
the luminance threshold of the background color for text color.</p></dd>
<dt>method</dt>
<dd><p>A character string that specifies the method for calculating
the luminance. Three different methods are available:
c("relative","perceived","perceived_2")</p></dd>
<dt>...</dt>
<dd><p>parameter overflow. Ignored.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>A character string that contains the best contrast text color.</p>
</div>
<div class="section level2">
<h2 id="details">Details<a class="anchor" aria-label="anchor" href="#details"></a></h2>
<p>This function aids in deciding the font color to print on a given background.
The function is based on the example provided by teppo:
https://stackoverflow.com/a/66669838/21019325.
The different methods provided are based on the methods outlined in the
StackOverflow thread:
https://stackoverflow.com/questions/596216/formula-to-determine-perceived-brightness-of-rgb-color</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">contrast_text</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"#F2F2F2"</span>, <span class="st">"blue"</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "black" "white"</span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">contrast_text</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"#F2F2F2"</span>, <span class="st">"blue"</span><span class="op">)</span>, method<span class="op">=</span><span class="st">"relative"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "black" "white"</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

118
reference/cpr_check.html Normal file
View File

@ -0,0 +1,118 @@
<!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"><meta name="description" content="Checking validity of cpr number. Vectorised."><title>CPR check — cpr_check • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="CPR check — cpr_check"><meta property="og:description" content="Checking validity of cpr number. Vectorised."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>CPR check</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/cpr_tools.R" class="external-link"><code>R/cpr_tools.R</code></a></small>
<div class="d-none name"><code>cpr_check.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Checking validity of cpr number. Vectorised.</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">cpr_check</span><span class="op">(</span><span class="va">cpr</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>cpr</dt>
<dd><p>cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Logical vector of cpr validity</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">fsd</span><span class="op">&lt;-</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2310450637"</span>, <span class="st">"010190-2000"</span>, <span class="st">"010115-4000"</span>,</span></span>
<span class="r-in"><span><span class="st">"300450-1030"</span>,<span class="st">"010150-4021"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">cpr_check</span><span class="op">(</span><span class="st">"2310450637"</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> See the vignette 'Toolbox'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE</span>
<span class="r-in"><span><span class="fu">cpr_check</span><span class="op">(</span><span class="va">fsd</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> See the vignette 'Toolbox'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/all.html" class="external-link">all</a></span><span class="op">(</span><span class="fu">cpr_check</span><span class="op">(</span><span class="va">fsd</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.</span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> </span>
<span class="r-msg co"><span class="r-pr">#&gt;</span> See the vignette 'Toolbox'</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

111
reference/cpr_dob.html Normal file
View File

@ -0,0 +1,111 @@
<!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"><meta name="description" content="For easy calculation. Does not handle cprs with letters (interim cpr)"><title>Extracting date of birth from CPR — cpr_dob • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Extracting date of birth from CPR — cpr_dob"><meta property="og:description" content="For easy calculation. Does not handle cprs with letters (interim cpr)"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Extracting date of birth from CPR</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/cpr_tools.R" class="external-link"><code>R/cpr_tools.R</code></a></small>
<div class="d-none name"><code>cpr_dob.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>For easy calculation. Does not handle cprs with letters (interim cpr)</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">cpr_dob</span><span class="op">(</span><span class="va">cpr</span>, format <span class="op">=</span> <span class="st">"%d-%m-%Y"</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>cpr</dt>
<dd><p>cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.</p></dd>
<dt>format</dt>
<dd><p>character string of dob date format. Default is "%d-%m-%Y".</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>character vector</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">cpr_dob</span><span class="op">(</span><span class="st">"231045-0637"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "23-10-1945"</span>
<span class="r-in"><span><span class="va">fsd</span><span class="op">&lt;-</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2310450637"</span>, <span class="st">"010190-2000"</span>, <span class="st">"010115-4000"</span>,</span></span>
<span class="r-in"><span><span class="st">"300450-1030"</span>,<span class="st">"010150-4021"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">cpr_dob</span><span class="op">(</span><span class="va">fsd</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] "23-10-1945" "01-01-1990" "01-01-2015" "30-04-1950" "01-01-1950"</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

119
reference/cpr_female.html Normal file
View File

@ -0,0 +1,119 @@
<!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"><meta name="description" content="Just checking if last number of a string is equal or not."><title>Determine female sex from CPR — cpr_female • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Determine female sex from CPR — cpr_female"><meta property="og:description" content="Just checking if last number of a string is equal or not."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Determine female sex from CPR</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/cpr_tools.R" class="external-link"><code>R/cpr_tools.R</code></a></small>
<div class="d-none name"><code>cpr_female.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Just checking if last number of a string is equal or not.</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">cpr_female</span><span class="op">(</span><span class="va">cpr</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>cpr</dt>
<dd><p>Vector. cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Logical vector</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">cpr_female</span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="cprs.html">cprs</a></span><span class="op">[</span>,<span class="fl">1</span><span class="op">]</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [13] TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [25] TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [37] TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [49] FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [61] FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [73] TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [85] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [97] TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [109] TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [121] TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [133] FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [145] TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [157] TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [169] TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE TRUE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [181] FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [193] TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

98
reference/cprs.html Normal file
View File

@ -0,0 +1,98 @@
<!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"><meta name="description" content="This is just a repeated sample of 8 synthesized cpr-numbers
for testing purposes."><title>Data frame of 200 cpr numbers — cprs • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Data frame of 200 cpr numbers — cprs"><meta property="og:description" content="This is just a repeated sample of 8 synthesized cpr-numbers
for testing purposes."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Data frame of 200 cpr numbers</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/cprs.R" class="external-link"><code>R/cprs.R</code></a></small>
<div class="d-none name"><code>cprs.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>This is just a repeated sample of 8 synthesized cpr-numbers
for testing purposes.</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"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">cprs</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A data frame with 200 rows and 1 variable:</p><dl><dt>cpr</dt>
<dd><p>Mixed format cpr-numbers, characters</p></dd>
</dl></div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><a href="https://da.wikipedia.org/wiki/231045-0637" class="external-link">https://da.wikipedia.org/wiki/231045-0637</a></p></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

183
reference/ds2dd.html Normal file
View File

@ -0,0 +1,183 @@
<!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"><meta name="description" content="Data set to data dictionary function"><title>Data set to data dictionary function — ds2dd • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Data set to data dictionary function — ds2dd"><meta property="og:description" content="Data set to data dictionary function"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Data set to data dictionary function</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/ds2dd.R" class="external-link"><code>R/ds2dd.R</code></a></small>
<div class="d-none name"><code>ds2dd.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Data set to data dictionary function</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">ds2dd</span><span class="op">(</span></span>
<span> <span class="va">ds</span>,</span>
<span> record.id <span class="op">=</span> <span class="st">"record_id"</span>,</span>
<span> form.name <span class="op">=</span> <span class="st">"basis"</span>,</span>
<span> field.type <span class="op">=</span> <span class="st">"text"</span>,</span>
<span> field.label <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> include.column.names <span class="op">=</span> <span class="cn">FALSE</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>ds</dt>
<dd><p>data set</p></dd>
<dt>record.id</dt>
<dd><p>name or column number of id variable, moved to first row of
data dictionary, character of integer. Default is "record_id".</p></dd>
<dt>form.name</dt>
<dd><p>vector of form names, character string, length 1 or length
equal to number of variables. Default is "basis".</p></dd>
<dt>field.type</dt>
<dd><p>vector of field types, character string, length 1 or length
equal to number of variables. Default is "text.</p></dd>
<dt>field.label</dt>
<dd><p>vector of form names, character string, length 1 or length
equal to number of variables. Default is NULL and is then identical to field
names.</p></dd>
<dt>include.column.names</dt>
<dd><p>Flag to give detailed output including new
column names for original data set for upload.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>data.frame or list of data.frame and vector</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">talos</span><span class="op">$</span><span class="va">id</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/seq.html" class="external-link">seq_len</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/nrow.html" class="external-link">nrow</a></span><span class="op">(</span><span class="va">talos</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">ds2dd</span><span class="op">(</span><span class="va">talos</span>, record.id<span class="op">=</span><span class="st">"id"</span>,include.column.names<span class="op">=</span><span class="cn">FALSE</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> field_name form_name section_header field_type field_label</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 id basis NA text id</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 rtreat basis NA text rtreat</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 mrs_1 basis NA text mrs_1</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 mrs_6 basis NA text mrs_6</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 hypertension basis NA text hypertension</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 diabetes basis NA text diabetes</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 civil basis NA text civil</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> select_choices_or_calculations field_note</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text_validation_type_or_show_slider_number text_validation_min</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text_validation_max identifier branching_logic required_field</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> custom_alignment question_number matrix_group_name matrix_ranking</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 NA NA NA NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> field_annotation</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 1 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 2 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 3 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 4 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 5 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 6 NA</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 7 NA</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
reference/figures/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

115
reference/files_filter.html Normal file
View File

@ -0,0 +1,115 @@
<!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"><meta name="description" content="This function filters files in a folder based on the
provided filter."><title>Filter files in a folder — files_filter • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Filter files in a folder — files_filter"><meta property="og:description" content="This function filters files in a folder based on the
provided filter."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Filter files in a folder</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/files_filter.R" class="external-link"><code>R/files_filter.R</code></a></small>
<div class="d-none name"><code>files_filter.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>This function filters files in a folder based on the
provided filter.</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">files_filter</span><span class="op">(</span><span class="va">folder.path</span>, <span class="va">filter.by</span>, full.names <span class="op">=</span> <span class="cn">TRUE</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>folder.path</dt>
<dd><p>character. Path of the folder to be filtered</p></dd>
<dt>filter.by</dt>
<dd><p>character. Filter to be applied on the files</p></dd>
<dt>full.names</dt>
<dd><p>logical. Whether to return full file names or not</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>character vector. Filtered files</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># Gives path to files/folders with "tests" in the name in the </span></span></span>
<span class="r-in"><span><span class="co"># working directory</span></span></span>
<span class="r-in"><span><span class="fu">files_filter</span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/getwd.html" class="external-link">getwd</a></span><span class="op">(</span><span class="op">)</span>,<span class="st">"tests"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> character(0)</span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

View File

@ -0,0 +1,125 @@
<!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"><meta name="description" content="Includes table 1, grotta bars and ordinal logistic regression plot.
Please just use this function for illustration purposes.
To dos: modify grottaBar and include as own function."><title>Generic stroke study outcome — generic_stroke • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Generic stroke study outcome — generic_stroke"><meta property="og:description" content="Includes table 1, grotta bars and ordinal logistic regression plot.
Please just use this function for illustration purposes.
To dos: modify grottaBar and include as own function."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Generic stroke study outcome</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/generic_stroke.R" class="external-link"><code>R/generic_stroke.R</code></a></small>
<div class="d-none name"><code>generic_stroke.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Includes table 1, grotta bars and ordinal logistic regression plot.
Please just use this function for illustration purposes.
To dos: modify grottaBar and include as own function.</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">generic_stroke</span><span class="op">(</span><span class="va">df</span>, <span class="va">group</span>, <span class="va">score</span>, strata <span class="op">=</span> <span class="cn">NULL</span>, variables <span class="op">=</span> <span class="cn">NULL</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>df</dt>
<dd><p>Data set as data frame</p></dd>
<dt>group</dt>
<dd><p>Variable to group by</p></dd>
<dt>score</dt>
<dd><p>Outcome measure variable</p></dd>
<dt>strata</dt>
<dd><p>Optional variable to stratify by</p></dd>
<dt>variables</dt>
<dd><p>String of variable names to include in adjusted OLR-analysis</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Returns list with three elements</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="co"># generic_stroke(df = stRoke::talos, group = "rtreat", score = "mrs_6", </span></span></span>
<span class="r-in"><span><span class="co"># variables = c("hypertension","diabetes","civil"))</span></span></span>
<span class="r-in"></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

188
reference/index.html Normal file
View File

@ -0,0 +1,188 @@
<!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>Function reference • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Function reference"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab fa fab fa-github fa-lg"></span>
</a>
</li>
</ul></div>
</div>
</nav><div class="container template-reference-index">
<div class="row">
<main id="main" class="col-md-9"><div class="page-header">
<img src="../logo.png" class="logo" alt=""><h1>Function reference</h1>
</div>
<div class="section level2">
<h2 id="all-functions">All functions<a class="anchor" aria-label="anchor" href="#all-functions"></a></h2>
</div><div id="" class="section level2">
<dl><dt>
<code><a href="age_calc.html">age_calc()</a></code>
</dt>
<dd>Calculate age in years, months, or days</dd>
</dl><dl><dt>
<code><a href="ci_plot.html">ci_plot()</a></code>
</dt>
<dd>Confidence interval plot with point estimate</dd>
</dl><dl><dt>
<code><a href="color_plot.html">color_plot()</a></code>
</dt>
<dd>Plot color examples with contrasting text</dd>
</dl><dl><dt>
<code><a href="contrast_text.html">contrast_text()</a></code>
</dt>
<dd>Contrast Text Color</dd>
</dl><dl><dt>
<code><a href="cpr_check.html">cpr_check()</a></code>
</dt>
<dd>CPR check</dd>
</dl><dl><dt>
<code><a href="cpr_dob.html">cpr_dob()</a></code>
</dt>
<dd>Extracting date of birth from CPR</dd>
</dl><dl><dt>
<code><a href="cpr_female.html">cpr_female()</a></code>
</dt>
<dd>Determine female sex from CPR</dd>
</dl><dl><dt>
<code><a href="cprs.html">cprs</a></code>
</dt>
<dd>Data frame of 200 cpr numbers</dd>
</dl><dl><dt>
<code><a href="ds2dd.html">ds2dd()</a></code>
</dt>
<dd>Data set to data dictionary function</dd>
</dl><dl><dt>
<code><a href="files_filter.html">files_filter()</a></code>
</dt>
<dd>Filter files in a folder</dd>
</dl><dl><dt>
<code><a href="generic_stroke.html">generic_stroke()</a></code>
</dt>
<dd>Generic stroke study outcome</dd>
</dl><dl><dt>
<code><a href="index_plot.html">index_plot()</a></code>
</dt>
<dd>Plot multidimensional cognitive test scores</dd>
</dl><dl><dt>
<code><a href="label_select.html">label_select()</a></code>
</dt>
<dd>Helper function for labels in gtsummary</dd>
</dl><dl><dt>
<code><a href="metadata_names.html">metadata_names</a></code>
</dt>
<dd>Vector of REDCap metadata headers</dd>
</dl><dl><dt>
<code><a href="print.win_Prob.html">print(<i>&lt;win_Prob&gt;</i>)</a></code>
</dt>
<dd>Prints win_prob results</dd>
</dl><dl><dt>
<code><a href="quantile_cut.html">quantile_cut()</a></code>
</dt>
<dd>Easy function for splitting numeric variable in quantiles</dd>
</dl><dl><dt>
<code><a href="score.html">score</a></code>
</dt>
<dd>Data frame with sample data of cognitive testing score</dd>
</dl><dl><dt>
<code><a href="source_lines.html">source_lines()</a></code>
</dt>
<dd>Source Lines from a File</dd>
</dl><dl><dt>
<code><a href="talos.html">talos</a></code>
</dt>
<dd>Data frame with sample of TALOS data</dd>
</dl><dl><dt>
<code><a href="win_prob.html">win_prob()</a></code>
</dt>
<dd>Calculates the probability of winning</dd>
</dl><dl><dt>
<code><a href="write_ical.html">write_ical()</a></code>
</dt>
<dd>Write ical object</dd>
</dl></div>
</main></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

BIN
reference/index_plot-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 KiB

133
reference/index_plot.html Normal file
View File

@ -0,0 +1,133 @@
<!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"><meta name="description" content="Plot index scores from five dimensional cognitive testing.
Includes option to facet."><title>Plot multidimensional cognitive test scores — index_plot • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Plot multidimensional cognitive test scores — index_plot"><meta property="og:description" content="Plot index scores from five dimensional cognitive testing.
Includes option to facet."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Plot multidimensional cognitive test scores</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/index_plot.R" class="external-link"><code>R/index_plot.R</code></a></small>
<div class="d-none name"><code>index_plot.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Plot index scores from five dimensional cognitive testing.
Includes option to facet.</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">index_plot</span><span class="op">(</span></span>
<span> <span class="va">ds</span>,</span>
<span> id <span class="op">=</span> <span class="st">"id"</span>,</span>
<span> sub_plot <span class="op">=</span> <span class="st">"_is"</span>,</span>
<span> scores <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"_is"</span>, <span class="st">"_lo"</span>, <span class="st">"_up"</span>, <span class="st">"_per"</span><span class="op">)</span>,</span>
<span> dom_names <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"immediate"</span>, <span class="st">"visuospatial"</span>, <span class="st">"verbal"</span>, <span class="st">"attention"</span>, <span class="st">"delayed"</span>, <span class="st">"total"</span><span class="op">)</span>,</span>
<span> facet.by <span class="op">=</span> <span class="cn">NULL</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>ds</dt>
<dd><p>complete data frame</p></dd>
<dt>id</dt>
<dd><p>colname of id column. Base for colouring</p></dd>
<dt>sub_plot</dt>
<dd><p>main outcome scores variable to plot</p></dd>
<dt>scores</dt>
<dd><p>variables to subset for plotting. Has to follow standard
naming (is to be changed)</p></dd>
<dt>dom_names</dt>
<dd><p>domain names for axis naming</p></dd>
<dt>facet.by</dt>
<dd><p>variable to base facet_grid on</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>ggplot element</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">index_plot</span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="score.html">score</a></span><span class="op">[</span><span class="va">score</span><span class="op">$</span><span class="va">event</span><span class="op">==</span><span class="st">"A"</span>,<span class="op">]</span><span class="op">)</span></span></span>
<span class="r-plt img"><img src="index_plot-1.png" alt="" width="700" height="433"></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

132
reference/label_select.html Normal file
View File

@ -0,0 +1,132 @@
<!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"><meta name="description" content='Function to select labels from list of label pairs (format: age~"Age").
Alternative is to use attributes, eg from library(Hmisc).'><title>Helper function for labels in gtsummary — label_select • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Helper function for labels in gtsummary — label_select"><meta property="og:description" content='Function to select labels from list of label pairs (format: age~"Age").
Alternative is to use attributes, eg from library(Hmisc).'><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Helper function for labels in gtsummary</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/label_select.R" class="external-link"><code>R/label_select.R</code></a></small>
<div class="d-none name"><code>label_select.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Function to select labels from list of label pairs (format: <code>age~"Age"</code>).
Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/Hmisc/" class="external-link">library(Hmisc)</a></code>.</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">label_select</span><span class="op">(</span><span class="va">lst</span>, <span class="va">vec</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>lst</dt>
<dd><p>List of variables and labels (format: <code>age~"Age"</code>)</p></dd>
<dt>vec</dt>
<dd><p>Vector of variables to be subset from the list</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>List of labels ordered like vec, formatted like lst</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">vars</span><span class="op">&lt;-</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"hypertension"</span>, <span class="st">"diabetes"</span>, <span class="st">"mrs_1"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">labels_all</span><span class="op">&lt;-</span><span class="fu"><a href="https://rdrr.io/r/base/list.html" class="external-link">list</a></span><span class="op">(</span><span class="va">rtreat</span><span class="op">~</span><span class="st">"Trial treatment"</span>,</span></span>
<span class="r-in"><span><span class="va">civil</span><span class="op">~</span><span class="st">"Cohabitation"</span>,</span></span>
<span class="r-in"><span><span class="va">diabetes</span><span class="op">~</span><span class="st">"Known diabetes"</span>, </span></span>
<span class="r-in"><span><span class="va">hypertension</span><span class="op">~</span><span class="st">"Known hypertension"</span>, </span></span>
<span class="r-in"><span><span class="va">mrs_1</span><span class="op">~</span><span class="st">"One month mRS"</span>, </span></span>
<span class="r-in"><span><span class="va">mrs_6</span><span class="op">~</span><span class="st">"Six months mRS"</span>, </span></span>
<span class="r-in"><span><span class="st">'[Intercept]'</span><span class="op">~</span><span class="st">"Intercept"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">label_select</span><span class="op">(</span><span class="va">labels_all</span>,<span class="va">vars</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[1]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> hypertension ~ "Known hypertension"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: 0x556255801920&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[2]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> diabetes ~ "Known diabetes"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: 0x556255801920&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [[3]]</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> mrs_1 ~ "One month mRS"</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;environment: 0x556255801920&gt;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="co">## With gtsummary::tbl_summary()</span></span></span>
<span class="r-in"><span><span class="co">#stRoke::talos[vars] |&gt; </span></span></span>
<span class="r-in"><span><span class="co">#gtsummary::tbl_summary(label = label_select(labels_all,vars))</span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

View File

@ -0,0 +1,95 @@
<!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"><meta name="description" content="Vector of REDCap metadata headers"><title>Vector of REDCap metadata headers — metadata_names • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Vector of REDCap metadata headers — metadata_names"><meta property="og:description" content="Vector of REDCap metadata headers"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Vector of REDCap metadata headers</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/metadata.R" class="external-link"><code>R/metadata.R</code></a></small>
<div class="d-none name"><code>metadata_names.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Vector of REDCap metadata headers</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"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">metadata_names</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>Vector of length 18 with REDCap metadata headers:</p><dl><dt>metadata_names</dt>
<dd><p>characterstrings</p></dd>
</dl></div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><a href="https://www.project-redcap.org/" class="external-link">https://www.project-redcap.org/</a></p></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

View File

@ -0,0 +1,101 @@
<!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"><meta name="description" content="Prints win_prob results"><title>Prints win_prob results — print.win_Prob • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Prints win_prob results — print.win_Prob"><meta property="og:description" content="Prints win_prob results"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Prints win_prob results</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/win_prob.R" class="external-link"><code>R/win_prob.R</code></a></small>
<div class="d-none name"><code>print.win_Prob.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Prints win_prob results</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="co"># S3 method for win_Prob</span></span>
<span><span class="fu"><a href="https://rdrr.io/r/base/print.html" class="external-link">print</a></span><span class="op">(</span><span class="va">x</span>, <span class="va">...</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>x</dt>
<dd><p>win_prob results.</p></dd>
<dt>...</dt>
<dd><p>ignored for now</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>Prints win_prob statistics.</p>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

146
reference/quantile_cut.html Normal file
View File

@ -0,0 +1,146 @@
<!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"><meta name="description" content="Using base/stats functions cut() and quantile()."><title>Easy function for splitting numeric variable in quantiles — quantile_cut • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Easy function for splitting numeric variable in quantiles — quantile_cut"><meta property="og:description" content="Using base/stats functions cut() and quantile()."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Easy function for splitting numeric variable in quantiles</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/quantile_cut.R" class="external-link"><code>R/quantile_cut.R</code></a></small>
<div class="d-none name"><code>quantile_cut.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Using base/stats functions cut() and quantile().</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">quantile_cut</span><span class="op">(</span></span>
<span> <span class="va">x</span>,</span>
<span> <span class="va">groups</span>,</span>
<span> y <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> na.rm <span class="op">=</span> <span class="cn">TRUE</span>,</span>
<span> group.names <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> ordered.f <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> inc.outs <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> detail.list <span class="op">=</span> <span class="cn">FALSE</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>x</dt>
<dd><p>Variable to cut.</p></dd>
<dt>groups</dt>
<dd><p>Number of groups.</p></dd>
<dt>y</dt>
<dd><p>alternative vector to draw quantile cuts from. Limits has
to be within x. Default is NULL.</p></dd>
<dt>na.rm</dt>
<dd><p>Remove NA's. Default is TRUE.</p></dd>
<dt>group.names</dt>
<dd><p>Names of groups to split to. Default is NULL,
giving intervals as names.</p></dd>
<dt>ordered.f</dt>
<dd><p>Set resulting vector as ordered. Default is FALSE.</p></dd>
<dt>inc.outs</dt>
<dd><p>Flag to include min(x) and max(x)
as borders in case of y!=NULL.</p></dd>
<dt>detail.list</dt>
<dd><p>flag to include details or not</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>vector or list with vector and details (length 2)</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">aa</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/numeric.html" class="external-link">as.numeric</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/sample.html" class="external-link">sample</a></span><span class="op">(</span><span class="fl">1</span><span class="op">:</span><span class="fl">1000</span>,<span class="fl">2000</span>,replace <span class="op">=</span> <span class="cn">TRUE</span><span class="op">)</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="va">x</span> <span class="op">&lt;-</span> <span class="fl">1</span><span class="op">:</span><span class="fl">450</span></span></span>
<span class="r-in"><span><span class="va">y</span> <span class="op">&lt;-</span> <span class="fl">6</span><span class="op">:</span><span class="fl">750</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/summary.html" class="external-link">summary</a></span><span class="op">(</span><span class="fu">quantile_cut</span><span class="op">(</span><span class="va">aa</span>,groups<span class="op">=</span><span class="fl">4</span>,detail.list<span class="op">=</span><span class="cn">FALSE</span><span class="op">)</span><span class="op">)</span> <span class="co">## Cuts quartiles</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1,235] (235,504] (504,739] (739,1e+03] </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 501 500 499 500 </span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

169
reference/score.html Normal file
View File

@ -0,0 +1,169 @@
<!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"><meta name="description" content="Contains non-identifiable organic trial data from a
five-dimensional cognitive test."><title>Data frame with sample data of cognitive testing score — score • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Data frame with sample data of cognitive testing score — score"><meta property="og:description" content="Contains non-identifiable organic trial data from a
five-dimensional cognitive test."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Data frame with sample data of cognitive testing score</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/score.R" class="external-link"><code>R/score.R</code></a></small>
<div class="d-none name"><code>score.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Contains non-identifiable organic trial data from a
five-dimensional cognitive test.</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"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">score</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A data frame with 20 rows and 26 variables:</p><dl><dt>id</dt>
<dd><p>id</p></dd>
<dt>event</dt>
<dd><p>event</p></dd>
<dt>a_is</dt>
<dd><p>domain a index score</p></dd>
<dt>b_is</dt>
<dd><p>domain b index score</p></dd>
<dt>c_is</dt>
<dd><p>domain c index score</p></dd>
<dt>d_is</dt>
<dd><p>domain d index score</p></dd>
<dt>e_is</dt>
<dd><p>domain e index score</p></dd>
<dt>i_is</dt>
<dd><p>total index score</p></dd>
<dt>a_lo</dt>
<dd><p>domain a lower ci</p></dd>
<dt>b_lo</dt>
<dd><p>domain b lower ci</p></dd>
<dt>c_lo</dt>
<dd><p>domain c lower ci</p></dd>
<dt>d_lo</dt>
<dd><p>domain d lower ci</p></dd>
<dt>e_lo</dt>
<dd><p>domain e lower ci</p></dd>
<dt>i_lo</dt>
<dd><p>total lower ci</p></dd>
<dt>a_up</dt>
<dd><p>domain a upper ci</p></dd>
<dt>b_up</dt>
<dd><p>domain b upper ci</p></dd>
<dt>c_up</dt>
<dd><p>domain c upper ci</p></dd>
<dt>d_up</dt>
<dd><p>domain d upper ci</p></dd>
<dt>e_up</dt>
<dd><p>domain e upper ci</p></dd>
<dt>i_up</dt>
<dd><p>total upper ci</p></dd>
<dt>a_per</dt>
<dd><p>domain a percentile</p></dd>
<dt>b_per</dt>
<dd><p>domain b percentile</p></dd>
<dt>c_per</dt>
<dd><p>domain c percentile</p></dd>
<dt>d_per</dt>
<dd><p>domain d percentile</p></dd>
<dt>e_per</dt>
<dd><p>domain e percentile</p></dd>
<dt>i_per</dt>
<dd><p>total percentile</p></dd>
</dl></div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

121
reference/source_lines.html Normal file
View File

@ -0,0 +1,121 @@
<!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"><meta name="description" content="Sources specific lines from a file"><title>Source Lines from a File — source_lines • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Source Lines from a File — source_lines"><meta property="og:description" content="Sources specific lines from a file"><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Source Lines from a File</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/source_lines.R" class="external-link"><code>R/source_lines.R</code></a></small>
<div class="d-none name"><code>source_lines.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Sources specific lines from a file</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">source_lines</span><span class="op">(</span><span class="va">file</span>, <span class="va">lines</span>, <span class="va">...</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>file</dt>
<dd><p>A character string giving the path to the file to be sourced.</p></dd>
<dt>lines</dt>
<dd><p>A numeric vector of line numbers to be sourced.</p></dd>
<dt>...</dt>
<dd><p>Additional arguments to be passed to <code><a href="https://rdrr.io/r/base/source.html" class="external-link">source</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>The result of <code><a href="https://rdrr.io/r/base/source.html" class="external-link">source</a></code>.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p>This function is borrowed from a
<a href="https://gist.github.com/christophergandrud/1eb4e095974204b12af9" class="external-link">gist</a>
by christophergandrud.</p></div>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">test_file</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/tempfile.html" class="external-link">tempfile</a></span><span class="op">(</span>fileext <span class="op">=</span> <span class="st">".R"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu"><a href="https://rdrr.io/r/base/writeLines.html" class="external-link">writeLines</a></span><span class="op">(</span><span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"# Line 1"</span>, <span class="st">"2+2"</span>, <span class="st">"# Line 3"</span><span class="op">)</span>, <span class="va">test_file</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="fu">source_lines</span><span class="op">(</span><span class="va">test_file</span>, <span class="fl">1</span><span class="op">:</span><span class="fl">2</span>, echo<span class="op">=</span><span class="cn">TRUE</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &gt; 2 + 2</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1] 4</span>
<span class="r-in"><span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

View File

@ -0,0 +1,103 @@
<!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"><meta name="description" content="
This is an R-toolbox of custom functions for convenient data management and analysis in clinical health research and teaching. The package is mainly collected for personal use, but any use beyond that is encouraged. This package has migrated functions from 'agdamsbo/daDoctoR', and new functions has been added. Version follows months and year. See NEWS/Changelog for release notes. This package includes sampled data from the TALOS trial (Kraglund et al (2018) doi:10.1161/STROKEAHA.117.020067
). The win_prob() function is based on work by Zou et al (2022) doi:10.1161/STROKEAHA.121.037744
. The age_calc() function is based on work by Becker (2020) doi:10.18637/jss.v093.i02
."><title>stRoke: Clinical Stroke Research — stRoke-package • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="stRoke: Clinical Stroke Research — stRoke-package"><meta property="og:description" content="
This is an R-toolbox of custom functions for convenient data management and analysis in clinical health research and teaching. The package is mainly collected for personal use, but any use beyond that is encouraged. This package has migrated functions from 'agdamsbo/daDoctoR', and new functions has been added. Version follows months and year. See NEWS/Changelog for release notes. This package includes sampled data from the TALOS trial (Kraglund et al (2018) doi:10.1161/STROKEAHA.117.020067
). The win_prob() function is based on work by Zou et al (2022) doi:10.1161/STROKEAHA.121.037744
. The age_calc() function is based on work by Becker (2020) doi:10.18637/jss.v093.i02
."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>stRoke: Clinical Stroke Research</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/stRoke-package.R" class="external-link"><code>R/stRoke-package.R</code></a></small>
<div class="d-none name"><code>stRoke-package.Rd</code></div>
</div>
<div class="ref-description section level2">
<p></p>
<p>This is an R-toolbox of custom functions for convenient data management and analysis in clinical health research and teaching. The package is mainly collected for personal use, but any use beyond that is encouraged. This package has migrated functions from 'agdamsbo/daDoctoR', and new functions has been added. Version follows months and year. See NEWS/Changelog for release notes. This package includes sampled data from the TALOS trial (Kraglund et al (2018) <a href="https://doi.org/10.1161/STROKEAHA.117.020067" class="external-link">doi:10.1161/STROKEAHA.117.020067</a>
). The win_prob() function is based on work by Zou et al (2022) <a href="https://doi.org/10.1161/STROKEAHA.121.037744" class="external-link">doi:10.1161/STROKEAHA.121.037744</a>
. The age_calc() function is based on work by Becker (2020) <a href="https://doi.org/10.18637/jss.v093.i02" class="external-link">doi:10.18637/jss.v093.i02</a>
.</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p>Useful links:</p><ul><li><p><a href="https://agdamsbo.github.io/stRoke/">https://agdamsbo.github.io/stRoke/</a></p></li>
<li><p><a href="https://github.com/agdamsbo/stRoke" class="external-link">https://github.com/agdamsbo/stRoke</a></p></li>
<li><p>Report bugs at <a href="https://github.com/agdamsbo/stRoke/issues" class="external-link">https://github.com/agdamsbo/stRoke/issues</a></p></li>
</ul></div>
</div>
<div class="section level2">
<h2 id="author">Author<a class="anchor" aria-label="anchor" href="#author"></a></h2>
<p><strong>Maintainer</strong>: Andreas Gammelgaard Damsbo <a href="mailto:agdamsbo@clin.au.dk">agdamsbo@clin.au.dk</a> (<a href="https://orcid.org/0000-0002-7559-1154" class="external-link">ORCID</a>)</p>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

110
reference/talos.html Normal file
View File

@ -0,0 +1,110 @@
<!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"><meta name="description" content="Contains of non-identifiable subset of data from the TALOS trial."><title>Data frame with sample of TALOS data — talos • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Data frame with sample of TALOS data — talos"><meta property="og:description" content="Contains of non-identifiable subset of data from the TALOS trial."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Data frame with sample of TALOS data</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/talos.R" class="external-link"><code>R/talos.R</code></a></small>
<div class="d-none name"><code>talos.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Contains of non-identifiable subset of data from the TALOS trial.</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"><a href="https://rdrr.io/r/utils/data.html" class="external-link">data</a></span><span class="op">(</span><span class="va">talos</span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="format">Format<a class="anchor" aria-label="anchor" href="#format"></a></h2>
<p>A data frame with 200 rows and 6 variables:</p><dl><dt>rtreat</dt>
<dd><p>Randomisation</p></dd>
<dt>mrs_1</dt>
<dd><p>Modified Rankin scale score at follow-up</p></dd>
<dt>mrs_6</dt>
<dd><p>Modified Rankin scale score at end of study</p></dd>
<dt>hypertension</dt>
<dd><p>Known hypertension</p></dd>
<dt>diabetes</dt>
<dd><p>Known diabetes</p></dd>
<dt>civil</dt>
<dd><p>Cohabitation status</p></dd>
</dl></div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p><a href="https://doi.org/10.1161/STROKEAHA.117.020067" class="external-link">doi:10.1161/STROKEAHA.117.020067</a></p>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

168
reference/win_prob.html Normal file
View File

@ -0,0 +1,168 @@
<!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"><meta name="description" content="Calculates the probability of winning (winP). In the referenced
article Zou et al (2022) proposes a method for calculating probability of
winning with a confidence interval an p-value testing."><title>Calculates the probability of winning — win_prob • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Calculates the probability of winning — win_prob"><meta property="og:description" content="Calculates the probability of winning (winP). In the referenced
article Zou et al (2022) proposes a method for calculating probability of
winning with a confidence interval an p-value testing."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Calculates the probability of winning</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/win_prob.R" class="external-link"><code>R/win_prob.R</code></a></small>
<div class="d-none name"><code>win_prob.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>Calculates the probability of winning (winP). In the referenced
article Zou et al (2022) proposes a method for calculating probability of
winning with a confidence interval an p-value testing.</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">win_prob</span><span class="op">(</span></span>
<span> <span class="va">data</span>,</span>
<span> response <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> group <span class="op">=</span> <span class="cn">NULL</span>,</span>
<span> alpha <span class="op">=</span> <span class="fl">0.05</span>,</span>
<span> beta <span class="op">=</span> <span class="fl">0.2</span>,</span>
<span> group.ratio <span class="op">=</span> <span class="fl">1</span>,</span>
<span> sample.size <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> print.tables <span class="op">=</span> <span class="cn">FALSE</span>,</span>
<span> dec <span class="op">=</span> <span class="fl">3</span></span>
<span><span class="op">)</span></span></code></pre></div>
</div>
<div class="section level2">
<h2 id="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
<p><a href="https://doi.org/10.1161/STROKEAHA.121.037744" class="external-link">doi:10.1161/STROKEAHA.121.037744</a></p>
</div>
<div class="section level2">
<h2 id="arguments">Arguments<a class="anchor" aria-label="anchor" href="#arguments"></a></h2>
<dl><dt>data</dt>
<dd><p>A data frame containing the response and group variable.</p></dd>
<dt>response</dt>
<dd><p>The name of the response variable.
Takes first column if empty.</p></dd>
<dt>group</dt>
<dd><p>The name of the group variable.
Takes second column if empty.</p></dd>
<dt>alpha</dt>
<dd><p>The alpha level for the hypothesis test. Default is 0.05.</p></dd>
<dt>beta</dt>
<dd><p>The beta level for the sample size calculation. Default is 0.2.</p></dd>
<dt>group.ratio</dt>
<dd><p>The ratio of group sizes. Default is 1.</p></dd>
<dt>sample.size</dt>
<dd><p>Flag to include sample size calculation. Default is FALSE.</p></dd>
<dt>print.tables</dt>
<dd><p>Flag to print cumulative tables. Default is FALSE.</p></dd>
<dt>dec</dt>
<dd><p>Numeric for decimals to print. Default is 3.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>A list containing the win_prob statistics.</p>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">win_prob</span><span class="op">(</span>data<span class="op">=</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="talos.html">talos</a></span>,response<span class="op">=</span><span class="st">"mrs_6"</span>,group<span class="op">=</span><span class="st">"rtreat"</span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Zou et al's winP (doi: 10.1161/STROKEAHA.121.037744) </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> Probability of a random observation in Placebo group </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> will have a higher response score than a random</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> observation in Active group:</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> winP: 0.400 (0.612, 0.372) p=0.0125</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> --------------------------------------------</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> The numbers needed to treat (NNT) are: -9</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> </span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

199
reference/write_ical.html Normal file
View File

@ -0,0 +1,199 @@
<!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"><meta name="description" content="This function creates an ical file based on a data frame with mixed events.
Export as .ics file using calendar::ic_write()."><title>Write ical object — write_ical • stRoke</title><!-- favicons --><link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png"><link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png"><link rel="apple-touch-icon" type="image/png" sizes="180x180" href="../apple-touch-icon.png"><link rel="apple-touch-icon" type="image/png" sizes="120x120" href="../apple-touch-icon-120x120.png"><link rel="apple-touch-icon" type="image/png" sizes="76x76" href="../apple-touch-icon-76x76.png"><link rel="apple-touch-icon" type="image/png" sizes="60x60" href="../apple-touch-icon-60x60.png"><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.2.2/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.2.2/bootstrap.bundle.min.js"></script><!-- Font Awesome icons --><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous"><!-- bootstrap-toc --><script src="https://cdn.jsdelivr.net/gh/afeld/bootstrap-toc@v1.0.1/dist/bootstrap-toc.min.js" integrity="sha256-4veVQbu7//Lk5TSmc7YV48MxtMy98e26cf5MrgZYnwo=" crossorigin="anonymous"></script><!-- headroom.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script><!-- clipboard.js --><script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script><!-- search --><script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/6.4.6/fuse.js" integrity="sha512-zv6Ywkjyktsohkbp9bb45V6tEMoWhzFzXis+LrMehmJZZSys19Yxf1dopHx7WzIKxr5tK2dVcYmaCk2uqdjF4A==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/autocomplete.js/0.38.0/autocomplete.jquery.min.js" integrity="sha512-GU9ayf+66Xx2TmpxqJpliWbT5PiGYxpaG8rfnBEk1LL8l1KGkRShhngwdXK1UgqhAzWpZHSiYPc09/NwDQIGyg==" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/mark.min.js" integrity="sha512-5CYOlHXGh6QpOFA/TeTylKLWfB3ftPsde7AnmhuitiTX4K5SqCLBeKro6sPS8ilsz1Q4NRx3v8Ko2IBiszzdww==" crossorigin="anonymous"></script><!-- pkgdown --><script src="../pkgdown.js"></script><meta property="og:title" content="Write ical object — write_ical"><meta property="og:description" content="This function creates an ical file based on a data frame with mixed events.
Export as .ics file using calendar::ic_write()."><meta property="og:image" content="https://agdamsbo.github.io/stRoke/logo.png"><!-- mathjax --><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></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]--></head><body>
<a href="#main" class="visually-hidden-focusable">Skip to contents</a>
<nav class="navbar fixed-top navbar-light navbar-expand-lg bg-light"><div class="container">
<a class="navbar-brand me-2" href="../index.html">stRoke</a>
<small class="nav-text text-muted me-auto" data-bs-toggle="tooltip" data-bs-placement="bottom" title="">23.6.1</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="active nav-item">
<a class="nav-link" href="../reference/index.html">Reference</a>
</li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false" aria-haspopup="true" id="dropdown-articles">Articles</a>
<div class="dropdown-menu" aria-labelledby="dropdown-articles">
<a class="dropdown-item" href="../articles/ds2dd.html">ds2dd</a>
<a class="dropdown-item" href="../articles/toolbox.html">Toolbox</a>
</div>
</li>
<li class="nav-item">
<a class="nav-link" href="../news/index.html">Changelog</a>
</li>
</ul><form class="form-inline my-2 my-lg-0" role="search">
<input type="search" class="form-control me-sm-2" aria-label="Toggle navigation" name="search-input" data-search-index="../search.json" id="search-input" placeholder="Search for" autocomplete="off"></form>
<ul class="navbar-nav"><li class="nav-item">
<a class="external-link nav-link" href="https://github.com/agdamsbo/stRoke/" aria-label="github">
<span class="fab 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>Write ical object</h1>
<small class="dont-index">Source: <a href="https://github.com/agdamsbo/stRoke/blob/HEAD/R/write_ical.R" class="external-link"><code>R/write_ical.R</code></a></small>
<div class="d-none name"><code>write_ical.Rd</code></div>
</div>
<div class="ref-description section level2">
<p>This function creates an ical file based on a data frame with mixed events.
Export as .ics file using <code><a href="https://rdrr.io/pkg/calendar/man/ic_write.html" class="external-link">calendar::ic_write()</a></code>.</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">write_ical</span><span class="op">(</span></span>
<span> <span class="va">df</span>,</span>
<span> date <span class="op">=</span> <span class="st">"date"</span>,</span>
<span> date.end <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> title <span class="op">=</span> <span class="st">"title"</span>,</span>
<span> time.start <span class="op">=</span> <span class="st">"start"</span>,</span>
<span> time.end <span class="op">=</span> <span class="st">"end"</span>,</span>
<span> place <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> place.def <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> time.def <span class="op">=</span> <span class="st">"10:00:00"</span>,</span>
<span> time.dur <span class="op">=</span> <span class="fl">60</span>,</span>
<span> descr <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> link <span class="op">=</span> <span class="cn">NA</span>,</span>
<span> t.zone <span class="op">=</span> <span class="st">"CET"</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>df</dt>
<dd><p>A data frame with the calendar data</p></dd>
<dt>date</dt>
<dd><p>The name of the event date column in the data frame</p></dd>
<dt>date.end</dt>
<dd><p>The name of the end date column in the data frame</p></dd>
<dt>title</dt>
<dd><p>The name of the title column in the data frame</p></dd>
<dt>time.start</dt>
<dd><p>The name of the start time column in the data frame</p></dd>
<dt>time.end</dt>
<dd><p>The name of the end time column in the data frame</p></dd>
<dt>place</dt>
<dd><p>The name of the place column in the data frame</p></dd>
<dt>place.def</dt>
<dd><p>Default location to use when place is NA</p></dd>
<dt>time.def</dt>
<dd><p>Default start time to use when time.start is NA</p></dd>
<dt>time.dur</dt>
<dd><p>Default duration of the event in minutes, if time.end is NA</p></dd>
<dt>descr</dt>
<dd><p>Name of description/notes column if any.</p></dd>
<dt>link</dt>
<dd><p>Name of link column, if any.</p></dd>
<dt>t.zone</dt>
<dd><p>A character string of time zone for events. The string must be
a time zone that is recognized by the user's OS.</p></dd>
</dl></div>
<div class="section level2">
<h2 id="value">Value<a class="anchor" aria-label="anchor" href="#value"></a></h2>
<p>ical object</p>
</div>
<div class="section level2">
<h2 id="see-also">See also<a class="anchor" aria-label="anchor" href="#see-also"></a></h2>
<div class="dont-index"><p><a href="https://github.com/ATFutures/calendar/" class="external-link">calendar package</a>
<a href="https://icalendar.org" class="external-link">icalendar standard webpage</a></p></div>
</div>
<div class="section level2">
<h2 id="ref-examples">Examples<a class="anchor" aria-label="anchor" href="#ref-examples"></a></h2>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">df</span> <span class="op">&lt;-</span> <span class="fu"><a href="https://rdrr.io/r/base/data.frame.html" class="external-link">data.frame</a></span><span class="op">(</span></span></span>
<span class="r-in"><span> date <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2020-02-10"</span>, <span class="st">"2020-02-11"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> date.end <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"2020-02-13"</span>,<span class="cn">NA</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> title <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Conference"</span>, <span class="st">"Lunch"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> start <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"12:00:00"</span>, <span class="cn">NA</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> time.end <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"13:00:00"</span>, <span class="cn">NA</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> note <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"Hi there"</span>,<span class="st">"Remember to come"</span><span class="op">)</span>,</span></span>
<span class="r-in"><span> link <span class="op">=</span> <span class="fu"><a href="https://rdrr.io/r/base/c.html" class="external-link">c</a></span><span class="op">(</span><span class="st">"https://icalendar.org"</span>,<span class="st">"https://agdamsbo.github.io/stRoke/"</span><span class="op">)</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-in"><span></span></span>
<span class="r-in"><span><span class="fu">write_ical</span><span class="op">(</span></span></span>
<span class="r-in"><span> <span class="va">df</span>,</span></span>
<span class="r-in"><span> date <span class="op">=</span> <span class="st">"date"</span>,</span></span>
<span class="r-in"><span> date.end <span class="op">=</span> <span class="st">"date.end"</span>,</span></span>
<span class="r-in"><span> title <span class="op">=</span> <span class="st">"title"</span>,</span></span>
<span class="r-in"><span> time.start <span class="op">=</span> <span class="st">"start"</span>,</span></span>
<span class="r-in"><span> time.end <span class="op">=</span> <span class="st">"time.end"</span>,</span></span>
<span class="r-in"><span> place.def <span class="op">=</span> <span class="st">"Conference Room"</span>,</span></span>
<span class="r-in"><span> descr <span class="op">=</span> <span class="st">"note"</span>,</span></span>
<span class="r-in"><span> link <span class="op">=</span> <span class="st">"link"</span></span></span>
<span class="r-in"><span><span class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># A tibble: 2 × 7</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> SUMMARY DTSTART DTEND UID LOCATION URL </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;dttm&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span> <span style="color: #949494; font-style: italic;">&lt;chr&gt;</span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">1</span> Conference 2020-02-10 <span style="color: #949494;">12:00:00</span> 2020-02-13 <span style="color: #949494;">13:00:00</span> ical-d81687… Confere… http…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #BCBCBC;">2</span> Lunch 2020-02-11 <span style="color: #949494;">10:00:00</span> 2020-02-11 <span style="color: #949494;">11:00:00</span> ical-f97c70… Confere… http…</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> <span style="color: #949494;"># 1 more variable: DESCRIPTION &lt;chr&gt;</span></span>
<span class="r-in"><span></span></span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
</nav></aside></div>
<footer><div class="pkgdown-footer-left">
<p></p><p>Developed by Andreas Gammelgaard Damsbo.</p>
</div>
<div class="pkgdown-footer-right">
<p></p><p>Site built with <a href="https://pkgdown.r-lib.org/" class="external-link">pkgdown</a> 2.0.7.</p>
</div>
</footer></div>
</body></html>

1
search.json Normal file

File diff suppressed because one or more lines are too long

93
sitemap.xml Normal file
View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://agdamsbo.github.io/stRoke/404.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/articles/ds2dd.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/articles/index.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/articles/toolbox.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/authors.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/index.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/news/index.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/age_calc.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/ci_plot.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/color_plot.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/contrast_text.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/cpr_check.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/cpr_dob.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/cpr_female.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/cprs.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/ds2dd.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/files_filter.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/generic_stroke.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/index.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/index_plot.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/label_select.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/metadata_names.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/print.win_Prob.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/quantile_cut.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/score.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/source_lines.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/stRoke-package.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/talos.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/win_prob.html</loc>
</url>
<url>
<loc>https://agdamsbo.github.io/stRoke/reference/write_ical.html</loc>
</url>
</urlset>