From 78a55baebb5f74d7a2c228469942a8d857e4d354 Mon Sep 17 00:00:00 2001 From: "Luke W. Johnston" Date: Fri, 8 Mar 2024 15:55:32 +0100 Subject: [PATCH 1/2] docs: drafting first section of getting started vignette --- vignettes/osdc.Rmd | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/vignettes/osdc.Rmd b/vignettes/osdc.Rmd index 25ab48a..95dd6dc 100644 --- a/vignettes/osdc.Rmd +++ b/vignettes/osdc.Rmd @@ -2,7 +2,7 @@ title: "Getting started with osdc" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{osdc} + %\VignetteIndexEntry{Getting started with osdc} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- @@ -14,6 +14,41 @@ knitr::opts_chunk$set( ) ``` +This package serves two overarching purposes: + +1. To provide an open-source, code-based algorithm to classify type 1 + and type 2 diabetes using Danish registers as data sources. +2. To inspire discussions within the Danish register-based research + space on the openness and ease of use on the existing tooling and + registers, and on the need for an official process for updating or + contributing to existing data sources. + +To read up on the overall design of this package as well as on the +algorithm, check out the `vignette("design")`. For more explanation on +the motivations, rationale, and needs for this algorithm and package, +check out the `vignette("explanation")`. + +## Usage + +First, let's load up the package, as well as dplyr. + ```{r setup} +library(dplyr) library(osdc) ``` + +The core of this package depends on the list of variables within +different registers that are needed in order to actually classify the +diabetes status of an individual. This can be found in the dataset: + +```{r} +variable_description +``` + +Let's convert that to a nicer format to show the list as a table. + +```{r} +variable_description |> + select(register_name, register_abbrev, variable_name, english_description) |> + knitr::kable() +``` From 4dbc76df442d5383972a2de35c86e990224aa064 Mon Sep 17 00:00:00 2001 From: Luke W Johnston Date: Fri, 15 Mar 2024 11:23:47 +0100 Subject: [PATCH 2/2] docs: minor edit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Signe Kirk Brødbæk <40836345+signekb@users.noreply.github.com> --- vignettes/osdc.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/osdc.Rmd b/vignettes/osdc.Rmd index 95dd6dc..b4f2fb1 100644 --- a/vignettes/osdc.Rmd +++ b/vignettes/osdc.Rmd @@ -38,7 +38,7 @@ library(osdc) ``` The core of this package depends on the list of variables within -different registers that are needed in order to actually classify the +different registers that are needed in order to classify the diabetes status of an individual. This can be found in the dataset: ```{r}