From 41c83a1ad330973541d63902bd70f4cbec05ed0b Mon Sep 17 00:00:00 2001 From: AG Damsbo Date: Wed, 12 Apr 2023 14:09:16 +0200 Subject: [PATCH] Site build for v2023.4.1 --- docs/404.html | 3 +- docs/articles/Toolbox.html | 98 ++++++----- docs/articles/ds2dd.html | 165 ++++++++++++++++++ docs/articles/index.html | 7 +- docs/authors.html | 3 +- docs/deps/bootstrap-5.2.2/bootstrap.min.css | 2 +- docs/index.html | 3 +- docs/news/index.html | 16 +- docs/pkgdown.yml | 3 +- docs/reference/age_calc.html | 3 +- docs/reference/ci_plot-2.png | Bin 69582 -> 65519 bytes docs/reference/ci_plot.html | 3 +- docs/reference/contrast_text.html | 138 +++++++++++++++ docs/reference/cpr_check.html | 3 +- docs/reference/cpr_dob.html | 3 +- docs/reference/cpr_female.html | 3 +- docs/reference/cprs.html | 3 +- docs/reference/ds2dd.html | 183 ++++++++++++++++++++ docs/reference/files_filter.html | 3 +- docs/reference/generic_stroke.html | 97 ++++++----- docs/reference/index.html | 18 +- docs/reference/index_plot.html | 3 +- docs/reference/label_select.html | 97 ++++++----- docs/reference/metadata_names.html | 95 ++++++++++ docs/reference/quantile_cut.html | 7 +- docs/reference/score.html | 3 +- docs/reference/source_lines.html | 3 +- docs/reference/stRoke-package.html | 3 +- docs/reference/talos.html | 3 +- docs/reference/win_prob.html | 3 +- docs/reference/write_ical.html | 3 +- docs/search.json | 2 +- docs/sitemap.xml | 12 ++ vignettes/ds2dd.Rmd | 3 +- vignettes/toolbox.Rmd | 5 +- 35 files changed, 825 insertions(+), 174 deletions(-) create mode 100644 docs/articles/ds2dd.html create mode 100644 docs/reference/contrast_text.html create mode 100644 docs/reference/ds2dd.html create mode 100644 docs/reference/metadata_names.html diff --git a/docs/404.html b/docs/404.html index 7c38c44..3bf78f2 100644 --- a/docs/404.html +++ b/docs/404.html @@ -24,7 +24,7 @@ stRoke - 23.1.8 + 23.4.1 + + + + + +
+ + + + +
+
+ + + + +
+

Easy data set to data base workflow +

+

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.

+
+

Step 1 - Load your data set +

+

Here we’ll use the sample TALOS dataset included with the +package.

+
+data("talos")
+# As the data set lacks an ID column, one is added
+talos$id <- seq_len(nrow(talos))
+
+
+

Step 2 - Create the DataDictionary +

+
+datadictionary <- ds2dd(talos,record.id = "id")
+

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.

+
+
+

Step 3 - Upload +

+

Now the DataDictionary can be exported as a spreadsheet and uploaded +or it can be uploaded using the REDCapR package (only +projects with “Development” status).

+

Use one of the two approaches below:

+
+

Manual upload +

+
+write.csv(datadictionary,"datadictionary.csv")
+
+
+

Upload with REDCapR +

+
+REDCapR::redcap_metadata_write(
+  datadictionary,
+  redcap_uri = keyring::key_get("DB_URI"),
+  token = keyring::key_get("DB_TOKEN")
+)
+

In the “REDCap R +Handbook” more is written on interfacing with REDCap in R using the +library(keyring)to store credentials in chapter +1.1.

+
+
+
+
+
+ + + +
+ + + +
+
+ + + + + + + diff --git a/docs/articles/index.html b/docs/articles/index.html index 13e4d21..73cfb69 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -10,7 +10,7 @@ stRoke - 23.1.8 + 23.4.1 + + + + + +
+
+
+ +
+

Calculates the best contrast text color for a given background color.

+
+ +
+

Usage

+
contrast_text(
+  background,
+  light_text = "white",
+  dark_text = "black",
+  threshold = 0.5,
+  method = "perceived_2"
+)
+
+ +
+

Arguments

+
background
+

A hex/named color value that represents the background.

+ + +
light_text
+

A hex/named color value that represents the light text color.

+ + +
dark_text
+

A hex/named color value that represents the dark text color.

+ + +
threshold
+

A numeric value between 0 and 1 that is used to determine +the luminance threshold of the background color for text color.

+ + +
method
+

A character string that specifies the method for calculating +the luminance. Three different methods are available: +c("relative","perceived","perceived_2")

+ +
+
+

Value

+ + +

A character string that contains the best contrast text color.

+
+
+

Details

+

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

+
+ +
+

Examples

+
contrast_text(c("#F2F2F2", "blue"))
+#> [1] "black" "white"
+
+contrast_text(c("#F2F2F2", "blue"), method="relative")
+#> [1] "black" "white"
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/docs/reference/cpr_check.html b/docs/reference/cpr_check.html index ab3d49e..ca4c76f 100644 --- a/docs/reference/cpr_check.html +++ b/docs/reference/cpr_check.html @@ -10,7 +10,7 @@ stRoke - 23.1.8 + 23.4.1 + + + + + +
+
+
+ +
+

Data set to data dictionary function

+
+ +
+

Usage

+
ds2dd(
+  ds,
+  record.id = "record_id",
+  form.name = "basis",
+  field.type = "text",
+  field.label = NULL,
+  include.column.names = FALSE
+)
+
+ +
+

Arguments

+
ds
+

data set

+ + +
record.id
+

name or column number of id variable, moved to first row of +data dictionary, character of integer. Default is "record_id".

+ + +
form.name
+

vector of form names, character string, length 1 or length +equal to number of variables. Default is "basis".

+ + +
field.type
+

vector of field types, character string, length 1 or length +equal to number of variables. Default is "text.

+ + +
field.label
+

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.

+ + +
include.column.names
+

Flag to give detailed output including new +column names for original data set for upload.

+ +
+
+

Value

+ + +

data.frame or list of data.frame and vector

+
+ +
+

Examples

+
talos$id <- seq_len(nrow(talos))
+ds2dd(talos, record.id="id",include.column.names=FALSE)
+#>     field_name form_name section_header field_type  field_label
+#> 1           id     basis             NA       text           id
+#> 2       rtreat     basis             NA       text       rtreat
+#> 3        mrs_1     basis             NA       text        mrs_1
+#> 4        mrs_6     basis             NA       text        mrs_6
+#> 5 hypertension     basis             NA       text hypertension
+#> 6     diabetes     basis             NA       text     diabetes
+#> 7        civil     basis             NA       text        civil
+#>   select_choices_or_calculations field_note
+#> 1                             NA         NA
+#> 2                             NA         NA
+#> 3                             NA         NA
+#> 4                             NA         NA
+#> 5                             NA         NA
+#> 6                             NA         NA
+#> 7                             NA         NA
+#>   text_validation_type_or_show_slider_number text_validation_min
+#> 1                                         NA                  NA
+#> 2                                         NA                  NA
+#> 3                                         NA                  NA
+#> 4                                         NA                  NA
+#> 5                                         NA                  NA
+#> 6                                         NA                  NA
+#> 7                                         NA                  NA
+#>   text_validation_max identifier branching_logic required_field
+#> 1                  NA         NA              NA             NA
+#> 2                  NA         NA              NA             NA
+#> 3                  NA         NA              NA             NA
+#> 4                  NA         NA              NA             NA
+#> 5                  NA         NA              NA             NA
+#> 6                  NA         NA              NA             NA
+#> 7                  NA         NA              NA             NA
+#>   custom_alignment question_number matrix_group_name matrix_ranking
+#> 1               NA              NA                NA             NA
+#> 2               NA              NA                NA             NA
+#> 3               NA              NA                NA             NA
+#> 4               NA              NA                NA             NA
+#> 5               NA              NA                NA             NA
+#> 6               NA              NA                NA             NA
+#> 7               NA              NA                NA             NA
+#>   field_annotation
+#> 1               NA
+#> 2               NA
+#> 3               NA
+#> 4               NA
+#> 5               NA
+#> 6               NA
+#> 7               NA
+
+
+
+ + +
+ + + +
+ + + + + + + diff --git a/docs/reference/files_filter.html b/docs/reference/files_filter.html index b710f5e..f1e9acc 100644 --- a/docs/reference/files_filter.html +++ b/docs/reference/files_filter.html @@ -12,7 +12,7 @@ provided filter."> + Skip to contents + + +
+
+
+ +
+

Vector of REDCap metadata headers

+
+ +
+

Usage

+
data(metadata_names)
+
+ +
+

Format

+

Vector of length 18 with REDCap metadata headers:

metadata_names
+

characterstrings

+ + +
+ + +
+ + +
+ + + +
+ + + + + + + diff --git a/docs/reference/quantile_cut.html b/docs/reference/quantile_cut.html index 4b1bddc..6ca35d6 100644 --- a/docs/reference/quantile_cut.html +++ b/docs/reference/quantile_cut.html @@ -10,7 +10,7 @@ stRoke - 23.1.8 + 23.4.1