Learn R Programming

stRoke package

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.

Contribute

This package is shared on GitHub, and you are very welcome to contribute by opening an issue or a pull request.

Installation

The package can be installed directly from CRAN:

install.packages("stRoke")

The latest version in development can be installed from GitHub:

remotes::install_github("agdamsbo/stRoke")

Copy Link

Version

Install

install.packages('stRoke')

Monthly Downloads

248

Version

25.9.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Andreas Gammelgaard Damsbo

Last Published

September 30th, 2025

Functions in stRoke (25.9.2)

cpr_dob

Extracting date of birth from CPR
win_prob

Calculates the probability of winning
trial

Data frame with synthetic data generated from the TALOS trial cohort
multi_rev

Reverses relevant MFI subscores
add_padding

MOVED Add padding to string
mfi_domains

MFI domain score calculator
pase_calc

PASE score calculator
print.win_Prob

Prints win_prob results
label_select

Helper function for labels in gtsummary
str_extract

Extract string based on regex pattern
write_ical

MOVED Write ical object
age_calc

Calculate age in years, months, or days
metadata_names

Vector of REDCap metadata headers
talos

Data frame with sample of TALOS data
chunks_of_n

MOVED Split to chunks of size n
cpr_female

Determine female sex from CPR
ci_plot

Confidence interval plot with point estimate
contrast_text

MOVED Contrast Text Color
color_plot

Plot color examples with contrasting text
files_filter

MOVED Filter files in a folder
index_plot

Plot multidimensional cognitive test scores
generic_stroke

Generic stroke study outcome
ds2dd

DEPRECATED Moved to REDCapCAST::ds2dd() | Data set to data dictionary function
n_chunks

Splits in n chunks
pase

Data frame with sample data of PASE score questionnaire
cprs

Data frame of 200 cpr numbers
cpr_check

CPR check
source_lines

Source Lines from a File
stRoke-package

stRoke: Clinical Stroke Research
score

Data frame with sample data of cognitive testing score
quantile_cut

MOVED Easy function for splitting numeric variable in quantiles