mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-11-23 21:40:22 +01:00
includes cprs data set
This commit is contained in:
parent
30b9265b4a
commit
c4e7bd4d50
@ -10,3 +10,5 @@
|
||||
^logo\.R$
|
||||
^ver_upd\.R$
|
||||
^data/cprs\.R$
|
||||
^data/cprs\.csv$
|
||||
^data-raw$
|
||||
|
@ -4,13 +4,14 @@ Version: 0.22.9.2
|
||||
Authors@R:
|
||||
person("Andreas Gammelgaard", "Damsbo", , "agdamsbo@clin.au.dk", role = c("aut", "cre"),
|
||||
comment = c(ORCID = "0000-0002-7559-1154"))
|
||||
Description: R functions for convenient data management an danalysis in health research.
|
||||
Description: R functions for convenient data management and analysis in health research.
|
||||
The package is mainly collected for personal use.
|
||||
For a start this package migrates functions from the agdamsbo/daDoctoR-package.
|
||||
License: GPL-3
|
||||
Encoding: UTF-8
|
||||
Roxygen: list(markdown = TRUE)
|
||||
RoxygenNote: 7.2.1
|
||||
LazyData: true
|
||||
Suggests:
|
||||
spelling,
|
||||
testthat (>= 3.0.0)
|
||||
|
@ -8,7 +8,8 @@
|
||||
#' @export
|
||||
#'
|
||||
#' @examples
|
||||
#' fsd<-c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
|
||||
#' fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
|
||||
#' cpr_check("2310450637")
|
||||
#' cpr_check(fsd)
|
||||
#' all(cpr_check(fsd))
|
||||
cpr_check<-function(cpr){
|
||||
@ -37,7 +38,7 @@ cpr_check<-function(cpr){
|
||||
|
||||
#' Extracting date of birth from CPR
|
||||
#'
|
||||
#' For easy calculation.
|
||||
#' For easy calculation. Does not handle cprs with letters (interim cpr)
|
||||
#' @param cpr cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.
|
||||
#' @keywords cpr
|
||||
#'
|
||||
@ -46,7 +47,7 @@ cpr_check<-function(cpr){
|
||||
#'
|
||||
#' @examples
|
||||
#' cpr_dob("231045-0637")
|
||||
#' fsd<-c("010190-2000", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
|
||||
#' fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
|
||||
#' cpr_dob(fsd)
|
||||
cpr_dob<-function(cpr){
|
||||
## Input as cpr-numbers in format ddmmyy-xxxx
|
||||
@ -114,16 +115,18 @@ cpr_dob<-function(cpr){
|
||||
#' Determine female sex from CPR
|
||||
#'
|
||||
#' Just checking if last number of a string is equal or not.
|
||||
#' @param cpr cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.
|
||||
#' @param cpr Vector. cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.
|
||||
#' @keywords cpr
|
||||
#'
|
||||
#' @return Logical vector
|
||||
#' @export
|
||||
#' @examples
|
||||
#' cpr_female("231045-0637")
|
||||
#' data(cprs)
|
||||
#' cpr_female(cprs[,1])
|
||||
cpr_female<-function(cpr){
|
||||
##Input as vector of DK cpr numbers, format "ddmmyy-xxxx", returns sex according to cpr
|
||||
if (!is.vector(cpr)) stop("Input has to be vector")
|
||||
|
||||
x <- nchar(as.character(cpr)) # Formats as character to avoid confusions
|
||||
|
||||
as.logical(as.integer(substr(cpr, start = x, stop = x)) %% 2)
|
||||
as.integer(substr(cpr, start = x, stop = x)) %% 2 == 0
|
||||
}
|
||||
|
12
R/cprs.R
Normal file
12
R/cprs.R
Normal file
@ -0,0 +1,12 @@
|
||||
#' Data frame of 200 cpr numbers
|
||||
#'
|
||||
#' This is just a repeated sample of 8 synthesized cpr-numbers for testing purposes.
|
||||
#'
|
||||
#' @format A data frame with 200 rows and 1 variable:
|
||||
#' \describe{
|
||||
#' \item{cpr}{Mixed format cpr-numbers, characters}
|
||||
#' }
|
||||
#' @source \url{https://da.wikipedia.org/wiki/231045-0637/}
|
||||
#' @usage data(cprs)
|
||||
"cprs"
|
||||
|
@ -1,17 +1,17 @@
|
||||
utils::globalVariables(c("or","ord","lo","up"))
|
||||
|
||||
#' Forrest plot from ordinal logistic regression.
|
||||
#' Forest plot from ordinal logistic regression.
|
||||
#'
|
||||
#' Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/
|
||||
#'
|
||||
#' @param x input data.
|
||||
#' @param title plot title
|
||||
#' @param dec decimals for labels
|
||||
#' @param lbls labels for variable names. Carefull, as the right order is not checked automatically!
|
||||
#' @param lbls labels for variable names. Careful, as the right order is not checked automatically!
|
||||
#' @param hori labels the horizontal axis (this i the y axis as the plot is rotated)
|
||||
#' @param vert labels the horizontal axis (this i the x axis as the plot is rotated)
|
||||
#' @param short flag to half number of ticks on horizontal axis.
|
||||
#' @param input can be either "model", which is a olr model (polr()), or "df", which is a dataframe whith three columns for OR, lower CI and upper CI.
|
||||
#' @param input can be either "model", which is a olr model (polr()), or "df", which is a data frame with three columns for OR, lower CI and upper CI.
|
||||
#'
|
||||
#' @return gg object
|
||||
#' @keywords forest plot
|
||||
|
@ -10,4 +10,4 @@ Please use the package or grab bits of the functions. Mind the licensing.
|
||||
|
||||
# GitHub
|
||||
|
||||
This package is [shared on GitHub](https://github.com/agdamsbo/stRoke), and you are very wellcome to contribute by opening an issue or a pull request.
|
||||
This package is [shared on GitHub](https://github.com/agdamsbo/stRoke), and you are very welcome to contribute by opening an issue or a pull request.
|
6
data-raw/cprs.R
Normal file
6
data-raw/cprs.R
Normal file
@ -0,0 +1,6 @@
|
||||
## code to prepare `cprs` dataset goes here
|
||||
|
||||
usethis::use_data(cprs, overwrite = TRUE)
|
||||
|
||||
cprs <- data.frame(cpr=sample(c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021","011085-AKE3","0101EJ-ATW3"),200,TRUE))
|
||||
save(cprs,file="cprs.rda")
|
200
data/cprs.csv
200
data/cprs.csv
@ -1,200 +0,0 @@
|
||||
011085-AKE3
|
||||
2310450637
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
0101896000
|
||||
010189-3000
|
||||
2310450637
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
2310450637
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
010150-4021
|
||||
0101896000
|
||||
300450-1030
|
||||
010189-3000
|
||||
010150-4021
|
||||
010189-3000
|
||||
010150-4021
|
||||
010115-4000
|
||||
0101896000
|
||||
300450-1030
|
||||
010189-3000
|
||||
011085-AKE3
|
||||
010115-4000
|
||||
011085-AKE3
|
||||
010189-3000
|
||||
2310450637
|
||||
0101896000
|
||||
010115-4000
|
||||
010150-4021
|
||||
300450-1030
|
||||
300450-1030
|
||||
011085-AKE3
|
||||
0101EJ-ATW3
|
||||
010189-3000
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
0101896000
|
||||
0101896000
|
||||
0101896000
|
||||
0101896000
|
||||
010115-4000
|
||||
010189-3000
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
010150-4021
|
||||
0101896000
|
||||
2310450637
|
||||
010189-3000
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
300450-1030
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
011085-AKE3
|
||||
010115-4000
|
||||
300450-1030
|
||||
010150-4021
|
||||
010189-3000
|
||||
010150-4021
|
||||
010189-3000
|
||||
2310450637
|
||||
010115-4000
|
||||
300450-1030
|
||||
010189-3000
|
||||
0101EJ-ATW3
|
||||
010189-3000
|
||||
011085-AKE3
|
||||
0101896000
|
||||
010189-3000
|
||||
300450-1030
|
||||
2310450637
|
||||
0101896000
|
||||
300450-1030
|
||||
010150-4021
|
||||
011085-AKE3
|
||||
2310450637
|
||||
300450-1030
|
||||
300450-1030
|
||||
300450-1030
|
||||
011085-AKE3
|
||||
010189-3000
|
||||
010189-3000
|
||||
010115-4000
|
||||
300450-1030
|
||||
010115-4000
|
||||
300450-1030
|
||||
011085-AKE3
|
||||
0101896000
|
||||
300450-1030
|
||||
2310450637
|
||||
011085-AKE3
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
010189-3000
|
||||
010189-3000
|
||||
2310450637
|
||||
0101896000
|
||||
300450-1030
|
||||
2310450637
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
0101EJ-ATW3
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
010150-4021
|
||||
2310450637
|
||||
300450-1030
|
||||
010115-4000
|
||||
010189-3000
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
010115-4000
|
||||
0101EJ-ATW3
|
||||
2310450637
|
||||
011085-AKE3
|
||||
011085-AKE3
|
||||
300450-1030
|
||||
0101896000
|
||||
011085-AKE3
|
||||
2310450637
|
||||
010189-3000
|
||||
0101896000
|
||||
300450-1030
|
||||
0101896000
|
||||
010189-3000
|
||||
300450-1030
|
||||
011085-AKE3
|
||||
0101896000
|
||||
010189-3000
|
||||
010150-4021
|
||||
0101896000
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
0101EJ-ATW3
|
||||
010150-4021
|
||||
011085-AKE3
|
||||
011085-AKE3
|
||||
010150-4021
|
||||
0101EJ-ATW3
|
||||
300450-1030
|
||||
0101896000
|
||||
300450-1030
|
||||
010189-3000
|
||||
010115-4000
|
||||
010150-4021
|
||||
0101896000
|
||||
010115-4000
|
||||
300450-1030
|
||||
010189-3000
|
||||
0101EJ-ATW3
|
||||
010189-3000
|
||||
2310450637
|
||||
010189-3000
|
||||
0101896000
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
0101EJ-ATW3
|
||||
2310450637
|
||||
010189-3000
|
||||
010189-3000
|
||||
2310450637
|
||||
2310450637
|
||||
010150-4021
|
||||
010115-4000
|
||||
2310450637
|
||||
011085-AKE3
|
||||
010150-4021
|
||||
010189-3000
|
||||
2310450637
|
||||
010189-3000
|
||||
010115-4000
|
||||
300450-1030
|
||||
0101896000
|
||||
011085-AKE3
|
||||
010150-4021
|
||||
010189-3000
|
||||
300450-1030
|
||||
0101EJ-ATW3
|
||||
2310450637
|
||||
010189-3000
|
||||
011085-AKE3
|
||||
2310450637
|
||||
0101EJ-ATW3
|
||||
010115-4000
|
||||
0101896000
|
||||
0101896000
|
||||
300450-1030
|
||||
0101896000
|
||||
0101896000
|
||||
010115-4000
|
|
BIN
data/cprs.rda
Normal file
BIN
data/cprs.rda
Normal file
Binary file not shown.
@ -5,7 +5,7 @@
|
||||
<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="R functions for convenient data management an danalysis in health research.
|
||||
<meta name="description" content="R functions for convenient data management and analysis in health research.
|
||||
The package is mainly collected for personal use.
|
||||
For a start this package migrates functions from the agdamsbo/daDoctoR-package.">
|
||||
<title>Tools for work in clinical stroke research • stRoke</title>
|
||||
@ -14,7 +14,7 @@
|
||||
<script src="deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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="Tools for work in clinical stroke research">
|
||||
<meta property="og:description" content="R functions for convenient data management an danalysis in health research.
|
||||
<meta property="og:description" content="R functions for convenient data management and analysis in health research.
|
||||
The package is mainly collected for personal use.
|
||||
For a start this package migrates functions from the agdamsbo/daDoctoR-package.">
|
||||
<!-- 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]>
|
||||
@ -64,7 +64,7 @@ Please use the package or grab bits of the functions. Mind the licensing.</p>
|
||||
<div class="section level1">
|
||||
<h1 id="github">GitHub<a class="anchor" aria-label="anchor" href="#github"></a>
|
||||
</h1>
|
||||
<p>This package is <a href="https://github.com/agdamsbo/stRoke" class="external-link">shared on GitHub</a>, and you are very wellcome to contribute by opening an issue or a pull request.</p>
|
||||
<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>
|
||||
|
||||
</main><aside class="col-md-3"><div class="license">
|
||||
|
@ -2,5 +2,5 @@ pandoc: 2.19.2
|
||||
pkgdown: 2.0.6
|
||||
pkgdown_sha: ~
|
||||
articles: {}
|
||||
last_built: 2022-09-23T17:08Z
|
||||
last_built: 2022-09-26T11:58Z
|
||||
|
||||
|
@ -60,11 +60,15 @@
|
||||
|
||||
<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"><-</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">"010115-4000"</span>, <span class="st">"0101896000"</span>,<span class="st">"010189-3000"</span>,<span class="st">"300450-1030"</span>,<span class="st">"010150-4021"</span><span class="op">)</span></span></span>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="va">fsd</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">"2310450637"</span>, <span class="st">"010190-2000"</span>, <span class="st">"010115-4000"</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">#></span> OBS: according to new description, not all valid CPR numbers apply to this modulus 11 rule. </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> Please refer to: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf</span>
|
||||
<span class="r-out co"><span class="r-pr">#></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">#></span> OBS: according to new description, not all valid CPR numbers apply to this modulus 11 rule. </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> Please refer to: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] TRUE FALSE FALSE FALSE FALSE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></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">#></span> OBS: according to new description, not all valid CPR numbers apply to this modulus 11 rule. </span>
|
||||
<span class="r-msg co"><span class="r-pr">#></span> Please refer to: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf</span>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!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."><title>Extracting date of birth from CPR — cpr_dob • stRoke</title><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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."><!-- 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]>
|
||||
<!-- 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><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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)"><!-- 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>
|
||||
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>For easy calculation.</p>
|
||||
<p>For easy calculation. Does not handle cprs with letters (interim cpr)</p>
|
||||
</div>
|
||||
|
||||
<div class="section level2">
|
||||
@ -62,10 +62,9 @@
|
||||
<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">#></span> [1] "1945-10-23"</span>
|
||||
<span class="r-in"><span><span class="va">fsd</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">"010190-2000"</span>, <span class="st">"010115-4000"</span>, <span class="st">"0101896000"</span>,<span class="st">"010189-3000"</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="va">fsd</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">"2310450637"</span>, <span class="st">"010190-2000"</span>, <span class="st">"010115-4000"</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">#></span> [1] "1990-01-01" "2015-01-01" "1889-01-01" "1989-01-01" "1950-04-30"</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [6] "1950-01-01"</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] "1945-10-23" "1990-01-01" "2015-01-01" "1950-04-30" "1950-01-01"</span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||
|
@ -48,7 +48,7 @@
|
||||
<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>
|
||||
<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">
|
||||
@ -60,8 +60,25 @@
|
||||
|
||||
<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="st">"231045-0637"</span><span class="op">)</span></span></span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1] TRUE</span>
|
||||
<div class="sourceCode"><pre class="sourceCode r"><code><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">cprs</span><span class="op">)</span></span></span>
|
||||
<span class="r-in"><span><span class="fu">cpr_female</span><span class="op">(</span><span class="va">cprs</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">#></span> [1] FALSE FALSE FALSE TRUE TRUE FALSE FALSE FALSE FALSE TRUE FALSE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [13] TRUE TRUE FALSE FALSE TRUE FALSE TRUE FALSE TRUE FALSE FALSE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [25] TRUE TRUE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [37] TRUE TRUE FALSE FALSE FALSE FALSE TRUE TRUE FALSE FALSE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [49] FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE FALSE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [61] FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE TRUE TRUE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [73] TRUE FALSE TRUE FALSE FALSE TRUE FALSE FALSE FALSE TRUE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [85] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [97] TRUE FALSE TRUE FALSE TRUE FALSE TRUE FALSE TRUE TRUE FALSE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [109] TRUE TRUE TRUE TRUE TRUE FALSE FALSE TRUE FALSE TRUE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [121] TRUE TRUE FALSE TRUE FALSE TRUE TRUE TRUE FALSE FALSE TRUE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [133] FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE TRUE FALSE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [145] TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE TRUE FALSE TRUE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [157] TRUE FALSE FALSE FALSE FALSE TRUE FALSE TRUE FALSE TRUE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [169] TRUE TRUE FALSE FALSE FALSE TRUE FALSE FALSE TRUE TRUE TRUE TRUE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [181] FALSE FALSE TRUE TRUE TRUE TRUE FALSE TRUE FALSE FALSE TRUE FALSE</span>
|
||||
<span class="r-out co"><span class="r-pr">#></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>
|
||||
|
79
docs/reference/cprs.html
Normal file
79
docs/reference/cprs.html
Normal file
@ -0,0 +1,79 @@
|
||||
<!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><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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."><!-- 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="">0.22.9.2</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>
|
||||
</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"></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="" class="logo" alt=""><h1>Data frame of 200 cpr numbers</h1>
|
||||
|
||||
<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="source">Source<a class="anchor" aria-label="anchor" href="#source"></a></h2>
|
||||
<p><a href="https://da.wikipedia.org/wiki/231045-0637/" class="external-link">https://da.wikipedia.org/wiki/231045-0637/</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.6.</p>
|
||||
</div>
|
||||
|
||||
</footer></div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</body></html>
|
||||
|
@ -67,9 +67,14 @@
|
||||
<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="plot_olr.html">plot_olr()</a></code>
|
||||
</dt>
|
||||
<dd>Forrest plot from ordinal logistic regression.</dd>
|
||||
<dd>Forest plot from ordinal logistic regression.</dd>
|
||||
</dl><dl><dt>
|
||||
|
||||
<code><a href="quantile_cut.html">quantile_cut()</a></code>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 89 KiB |
@ -1,5 +1,5 @@
|
||||
<!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="Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/"><title>Forrest plot from ordinal logistic regression. — plot_olr • stRoke</title><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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="Forrest plot from ordinal logistic regression. — plot_olr"><meta property="og:description" content="Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/"><!-- 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]>
|
||||
<!-- 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="Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/"><title>Forest plot from ordinal logistic regression. — plot_olr • stRoke</title><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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="Forest plot from ordinal logistic regression. — plot_olr"><meta property="og:description" content="Heavily inspired by https://www.r-bloggers.com/plotting-odds-ratios-aka-a-forrestplot-with-ggplot2/"><!-- 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>
|
||||
@ -31,7 +31,7 @@
|
||||
</nav><div class="container template-reference-topic">
|
||||
<div class="row">
|
||||
<main id="main" class="col-md-9"><div class="page-header">
|
||||
<img src="" class="logo" alt=""><h1>Forrest plot from ordinal logistic regression.</h1>
|
||||
<img src="" class="logo" alt=""><h1>Forest plot from ordinal logistic regression.</h1>
|
||||
|
||||
<div class="d-none name"><code>plot_olr.Rd</code></div>
|
||||
</div>
|
||||
@ -69,7 +69,7 @@
|
||||
|
||||
|
||||
<dt>lbls</dt>
|
||||
<dd><p>labels for variable names. Carefull, as the right order is not checked automatically!</p></dd>
|
||||
<dd><p>labels for variable names. Careful, as the right order is not checked automatically!</p></dd>
|
||||
|
||||
|
||||
<dt>hori</dt>
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
|
||||
<dt>input</dt>
|
||||
<dd><p>can be either "model", which is a olr model (polr()), or "df", which is a dataframe whith three columns for OR, lower CI and upper CI.</p></dd>
|
||||
<dd><p>can be either "model", which is a olr model (polr()), or "df", which is a data frame with three columns for OR, lower CI and upper CI.</p></dd>
|
||||
|
||||
</dl></div>
|
||||
<div class="section level2">
|
||||
|
@ -101,8 +101,8 @@
|
||||
<span class="r-in"><span><span class="va">x</span> <span class="op"><-</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"><-</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">#></span> [1,249] (249,496] (496,747] (747,1e+03] </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 500 502 500 498 </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> [1,236] (236,490] (490,751] (751,1e+03] </span>
|
||||
<span class="r-out co"><span class="r-pr">#></span> 502 498 501 499 </span>
|
||||
</code></pre></div>
|
||||
</div>
|
||||
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<!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="R functions for convenient data management an danalysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package."><title>stRoke: Tools for work in clinical stroke research — stRoke-package • stRoke</title><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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: Tools for work in clinical stroke research — stRoke-package"><meta property="og:description" content="R functions for convenient data management an danalysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package."><!-- 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]>
|
||||
<!-- 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="R functions for convenient data management and analysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package."><title>stRoke: Tools for work in clinical stroke research — stRoke-package • stRoke</title><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.1.3/bootstrap.min.css" rel="stylesheet"><script src="../deps/bootstrap-5.1.3/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.rawgit.com/afeld/bootstrap-toc/v1.0.1/dist/bootstrap-toc.min.js"></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: Tools for work in clinical stroke research — stRoke-package"><meta property="og:description" content="R functions for convenient data management and analysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package."><!-- 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>
|
||||
@ -37,7 +37,7 @@
|
||||
</div>
|
||||
|
||||
<div class="ref-description section level2">
|
||||
<p>R functions for convenient data management an danalysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package.</p>
|
||||
<p>R functions for convenient data management and analysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package.</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -24,6 +24,9 @@
|
||||
<url>
|
||||
<loc>/reference/cpr_female.html</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>/reference/cprs.html</loc>
|
||||
</url>
|
||||
<url>
|
||||
<loc>/reference/index.html</loc>
|
||||
</url>
|
||||
|
@ -1,5 +1,7 @@
|
||||
Andreas
|
||||
CMD
|
||||
Gammelgaard
|
||||
NA's
|
||||
ORCID
|
||||
Vectorised
|
||||
agdamsbo
|
||||
@ -7,5 +9,13 @@ cpr
|
||||
daDoctoR
|
||||
ddmmyy
|
||||
ddmmyyxxxx
|
||||
df
|
||||
forrestplot
|
||||
gg
|
||||
ggplot
|
||||
https
|
||||
olr
|
||||
polr
|
||||
www
|
||||
xxxx
|
||||
yyyy
|
||||
|
@ -16,7 +16,8 @@ Logical vector of cpr validity
|
||||
Checking validity of cpr number. Vectorised.
|
||||
}
|
||||
\examples{
|
||||
fsd<-c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
|
||||
fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
|
||||
cpr_check("2310450637")
|
||||
cpr_check(fsd)
|
||||
all(cpr_check(fsd))
|
||||
}
|
||||
|
@ -13,11 +13,11 @@ cpr_dob(cpr)
|
||||
vector of Date elements. Format yyyy-mm-dd
|
||||
}
|
||||
\description{
|
||||
For easy calculation.
|
||||
For easy calculation. Does not handle cprs with letters (interim cpr)
|
||||
}
|
||||
\examples{
|
||||
cpr_dob("231045-0637")
|
||||
fsd<-c("010190-2000", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021")
|
||||
fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
|
||||
cpr_dob(fsd)
|
||||
}
|
||||
\keyword{cpr}
|
||||
|
@ -7,7 +7,7 @@
|
||||
cpr_female(cpr)
|
||||
}
|
||||
\arguments{
|
||||
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.}
|
||||
\item{cpr}{Vector. cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.}
|
||||
}
|
||||
\value{
|
||||
Logical vector
|
||||
@ -16,6 +16,7 @@ Logical vector
|
||||
Just checking if last number of a string is equal or not.
|
||||
}
|
||||
\examples{
|
||||
cpr_female("231045-0637")
|
||||
data(cprs)
|
||||
cpr_female(cprs[,1])
|
||||
}
|
||||
\keyword{cpr}
|
||||
|
22
man/cprs.Rd
Normal file
22
man/cprs.Rd
Normal file
@ -0,0 +1,22 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/cprs.R
|
||||
\docType{data}
|
||||
\name{cprs}
|
||||
\alias{cprs}
|
||||
\title{Data frame of 200 cpr numbers}
|
||||
\format{
|
||||
A data frame with 200 rows and 1 variable:
|
||||
\describe{
|
||||
\item{cpr}{Mixed format cpr-numbers, characters}
|
||||
}
|
||||
}
|
||||
\source{
|
||||
\url{https://da.wikipedia.org/wiki/231045-0637/}
|
||||
}
|
||||
\usage{
|
||||
data(cprs)
|
||||
}
|
||||
\description{
|
||||
This is just a repeated sample of 8 synthesized cpr-numbers for testing purposes.
|
||||
}
|
||||
\keyword{datasets}
|
@ -2,7 +2,7 @@
|
||||
% Please edit documentation in R/plot_olr.R
|
||||
\name{plot_olr}
|
||||
\alias{plot_olr}
|
||||
\title{Forrest plot from ordinal logistic regression.}
|
||||
\title{Forest plot from ordinal logistic regression.}
|
||||
\usage{
|
||||
plot_olr(
|
||||
x,
|
||||
@ -22,7 +22,7 @@ plot_olr(
|
||||
|
||||
\item{dec}{decimals for labels}
|
||||
|
||||
\item{lbls}{labels for variable names. Carefull, as the right order is not checked automatically!}
|
||||
\item{lbls}{labels for variable names. Careful, as the right order is not checked automatically!}
|
||||
|
||||
\item{hori}{labels the horizontal axis (this i the y axis as the plot is rotated)}
|
||||
|
||||
@ -30,7 +30,7 @@ plot_olr(
|
||||
|
||||
\item{short}{flag to half number of ticks on horizontal axis.}
|
||||
|
||||
\item{input}{can be either "model", which is a olr model (polr()), or "df", which is a dataframe whith three columns for OR, lower CI and upper CI.}
|
||||
\item{input}{can be either "model", which is a olr model (polr()), or "df", which is a data frame with three columns for OR, lower CI and upper CI.}
|
||||
}
|
||||
\value{
|
||||
gg object
|
||||
|
@ -6,7 +6,7 @@
|
||||
\alias{stRoke-package}
|
||||
\title{stRoke: Tools for work in clinical stroke research}
|
||||
\description{
|
||||
R functions for convenient data management an danalysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package.
|
||||
R functions for convenient data management and analysis in health research. The package is mainly collected for personal use. For a start this package migrates functions from the agdamsbo/daDoctoR-package.
|
||||
}
|
||||
\author{
|
||||
\strong{Maintainer}: Andreas Gammelgaard Damsbo \email{agdamsbo@clin.au.dk} (\href{https://orcid.org/0000-0002-7559-1154}{ORCID})
|
||||
|
@ -1,26 +1,26 @@
|
||||
test_that("cpr_check() works for vectors, giving logicals", {
|
||||
testthat::test_that("cpr_check() works for vectors, giving logicals", {
|
||||
result <- cpr_check(c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021"))
|
||||
expect_equal(any(result), TRUE)
|
||||
expect_type(result, "logical")
|
||||
expect_equal(result[2], FALSE)
|
||||
testthat::expect_equal(any(result), TRUE)
|
||||
testthat::expect_type(result, "logical")
|
||||
testthat::expect_equal(result[2], FALSE)
|
||||
})
|
||||
|
||||
################################################################################
|
||||
|
||||
test_that("cpr_dob() works for vectors, giving logicals", {
|
||||
testthat::test_that("cpr_dob() works for vectors, giving logicals", {
|
||||
result <- cpr_dob(c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021"))
|
||||
expect_type(result, "double")
|
||||
expect_s3_class(result, "Date")
|
||||
expect_length(result, 6)
|
||||
testthat::expect_type(result, "double")
|
||||
testthat::expect_s3_class(result, "Date")
|
||||
testthat::expect_length(result, 6)
|
||||
})
|
||||
|
||||
################################################################################
|
||||
|
||||
test_that("cpr_female() works for vectors, giving logicals", {
|
||||
testthat::test_that("cpr_female() works for vectors, giving logicals", {
|
||||
result <- cpr_female(c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021"))
|
||||
expect_type(result, "logical")
|
||||
expect_length(result, 6)
|
||||
expect_equal(result[2], FALSE)
|
||||
testthat::expect_type(result, "logical")
|
||||
testthat::expect_length(result, 6)
|
||||
testthat::expect_equal(result[2], TRUE)
|
||||
})
|
||||
|
||||
################################################################################
|
Loading…
Reference in New Issue
Block a user