major documentation overhaul

This commit is contained in:
AG Damsbo 2023-01-11 12:54:08 +01:00
parent d47f3992c0
commit 60bf4a1cf1
52 changed files with 662 additions and 278 deletions

View File

@ -1,6 +1,6 @@
Package: stRoke
Title: Clinical stroke research toolbox
Version: 0.23.1.2
Title: Clinical Stroke Research Toolbox
Version: 0.23.1.3
Authors@R:
person("Andreas Gammelgaard", "Damsbo", , "agdamsbo@clin.au.dk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154"))
@ -33,7 +33,8 @@ Imports:
rankinPlot,
REDCapR,
stats,
tidyr
tidyr,
utils
Depends:
R (>= 2.10)
Remotes:

View File

@ -5,6 +5,7 @@ export(ci_plot)
export(cpr_check)
export(cpr_dob)
export(cpr_female)
export(files_filter)
export(generic_stroke)
export(index_plot)
export(label_select)
@ -13,6 +14,7 @@ export(quantile_cut)
export(read_redcap_tables)
export(source_lines)
import(ggplot2)
import(utils)
importFrom(MASS,polr)
importFrom(dplyr,mutate)
importFrom(dplyr,select)
@ -20,9 +22,11 @@ importFrom(gtsummary,add_overall)
importFrom(gtsummary,tbl_summary)
importFrom(rankinPlot,grottaBar)
importFrom(stats,as.formula)
importFrom(stats,binomial)
importFrom(stats,coef)
importFrom(stats,confint)
importFrom(stats,formula)
importFrom(stats,glm)
importFrom(stats,lm)
importFrom(stats,quantile)
importFrom(stats,reorder)

15
NEWS.md
View File

@ -1,3 +1,18 @@
# stRoke 0.23.1.3
## Functions:
* files_filter() added. Simple function to get file names in path with specified filter.
* updated cpr_dob to give warnings if format is not recognised and return NAs.
* ci_plot() updated to actually handle binary factors. Uses glm(), not lm().
## Documentation:
* test, test and tests to satisfy codecov and, of course, ensure higher quality
* changes to comply with goodpractices::gp()
...and probably some more.
# stRoke 0.23.1.2
## Functions:

View File

@ -11,14 +11,14 @@
#' @examples
#' trunc(age_calc(as.Date("1945-10-23"),as.Date("2018-09-30")))
#' @references
#' Becker, J.P. (2020). eeptools: An R Package for Teaching and Learning Ecology and Evolutionary Biology. Journal of Statistical Software, 93(2), 1-27. doi: 10.18637/jss.v093.i02
#' Becker, J.P. (2020). eeptools: An R Package for Teaching and Learning Ecology
#' and Evolutionary Biology. Journal of Statistical Software, 93(2), 1-27.
#' doi: 10.18637/jss.v093.i02
#'
#' @seealso \code{\link[lubridate]{time_length}}
#' @keywords date time age
age_calc<-function (dob, enddate = Sys.Date(), units = "years", precise = TRUE)
## Build upon the work of Jason P. Becker, as part of the eeptools
## Alternative is to just use lubridate::time_length
{
if (!inherits(dob, "Date") | !inherits(enddate, "Date")) {
@ -37,10 +37,14 @@ age_calc<-function (dob, enddate = Sys.Date(), units = "years", precise = TRUE)
end <- as.POSIXlt(enddate)
if (precise) {
start_is_leap <- ifelse(start$year%%400 == 0, TRUE, ifelse(start$year%%100 ==
0, FALSE, ifelse(start$year%%4 == 0, TRUE, FALSE)))
end_is_leap <- ifelse(end$year%%400 == 0, TRUE, ifelse(end$year%%100 ==
0, FALSE, ifelse(end$year%%4 == 0, TRUE, FALSE)))
start_is_leap <- ifelse(start$year%%400 == 0, TRUE,
ifelse(start$year%%100 == 0,
FALSE,
ifelse(start$year%%4 == 0, TRUE, FALSE)))
end_is_leap <- ifelse(end$year%%400 == 0, TRUE,
ifelse(end$year%%100 == 0,
FALSE,
ifelse(end$year%%4 == 0, TRUE, FALSE)))
}
if (units == "days") {
result <- as.numeric(difftime(end, start, units = "days"))
@ -50,16 +54,20 @@ age_calc<-function (dob, enddate = Sys.Date(), units = "years", precise = TRUE)
by = "months", SIMPLIFY = FALSE), length) - 1
if (precise) {
month_length_end <- ifelse(end$mon == 1 & end_is_leap,
29, ifelse(end$mon == 1, 28, ifelse(end$mon %in%
c(3, 5, 8, 10), 30, 31)))
29, ifelse(end$mon == 1, 28,
ifelse(end$mon %in% c(3, 5, 8, 10),
30, 31)))
month_length_prior <- ifelse((end$mon - 1) == 1 &
start_is_leap, 29, ifelse((end$mon - 1) == 1,
28, ifelse((end$mon - 1) %in% c(3, 5, 8, 10),
30, 31)))
month_frac <- ifelse(end$mday > start$mday, (end$mday -
start$mday)/month_length_end, ifelse(end$mday <
start$mday, (month_length_prior - start$mday)/month_length_prior +
end$mday/month_length_end, 0))
start_is_leap, 29,
ifelse((end$mon - 1) == 1, 28,
ifelse((end$mon - 1) %in%
c(3, 5, 8, 10), 30, 31)))
month_frac <- ifelse(end$mday > start$mday,
(end$mday - start$mday)/month_length_end,
ifelse(end$mday < start$mday,
(month_length_prior -
start$mday)/month_length_prior +
end$mday/month_length_end, 0))
result <- months + month_frac
}
else {
@ -76,10 +84,11 @@ age_calc<-function (dob, enddate = Sys.Date(), units = "years", precise = TRUE)
60, start$yday - 1, start$yday)
end_day <- ifelse(end_is_leap & end$yday >= 60, end$yday -
1, end$yday)
year_frac <- ifelse(start_day < end_day, (end_day -
start_day)/end_length, ifelse(start_day > end_day,
(start_length - start_day)/start_length + end_day/end_length,
0))
year_frac <- ifelse(start_day <
end_day, (end_day - start_day)/end_length,
ifelse(start_day > end_day,
(start_length - start_day)/start_length +
end_day/end_length, 0))
result <- years + year_frac
}
else {

View File

@ -1,7 +1,8 @@
utils::globalVariables(c("vname"))
#' Confidence interval plot with point estimate
#'
#' Horizontal forest plot of point estimate with confidence intervals. Includes dichotomous or olr, depending on number of levels in "x".
#' 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.
#'
#' @param ds data set
@ -17,7 +18,7 @@ utils::globalVariables(c("vname"))
#'
#' @import ggplot2
#' @importFrom MASS polr
#' @importFrom stats as.formula coef confint lm quantile reorder
#' @importFrom stats as.formula coef confint lm quantile reorder binomial glm
#'
#' @examples
#' data(talos)
@ -25,20 +26,22 @@ utils::globalVariables(c("vname"))
#' ci_plot(ds = talos, x = "rtreat", y = "mrs_1", vars = c("hypertension","diabetes"))
ci_plot<- function(ds, x, y, vars=NULL, dec=3, lbls=NULL, title=NULL){
if (is.factor(ds[y])) stop("Outcome has to be factor")
if (!is.factor(ds[,y])) stop("Outcome has to be factor")
# Formula
ci_form <- as.formula(paste0(y,"~",x,"+."))
# Ordinal logistic regression for non-dichotomous factors
if (length(levels(ds[,y])) > 2){
m <- MASS::polr(formula = ci_form, data=ds[,unique(c(x, y, vars))], Hess=TRUE, method="logistic")
m <- MASS::polr(formula = ci_form, data=ds[,unique(c(x, y, vars))],
Hess=TRUE, method="logistic")
if (is.null(title)) title <- "Ordinal logistic regression"
}
# Binary logistic regression for dichotomous factors
if (length(levels(ds[,y])) == 2){
m <- lm(formula = ci_form, data=ds[,unique(c(x, y, vars))])
m <- glm(formula = ci_form, data=ds[unique(c(x, y, vars))],
family=binomial())
if (is.null(title)) title <- "Binary logistic regression"
}
@ -48,17 +51,22 @@ ci_plot<- function(ds, x, y, vars=NULL, dec=3, lbls=NULL, title=NULL){
rodds<-round(odds, digits = dec)
if (is.null(lbls)){
odds$vname<-paste0(row.names(odds)," \n",paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
odds$vname<-paste0(row.names(odds)," \n",
paste0(rodds$or,"
[",rodds$lo,":",rodds$up,"]"))
} else {
odds$vname<-paste0(lbls," \n",paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
odds$vname<-paste0(lbls," \n",paste0(rodds$or,
" [",rodds$lo,":",rodds$up,"]"))
}
odds$ord<-c(nrow(odds):1)
odds$ord<-rev(seq_len(nrow(odds)))
ggplot2::ggplot(data = odds, mapping = ggplot2::aes(y = or, x = reorder(vname,ord))) +
ggplot2::ggplot(data = odds,
mapping = ggplot2::aes(y = or, x = reorder(vname,ord))) +
ggplot2::geom_point() +
ggplot2::geom_errorbar(mapping = ggplot2::aes(ymin=lo, ymax=up), width = 0.2) +
ggplot2::geom_errorbar(mapping = ggplot2::aes(ymin=lo, ymax=up),
width = 0.2) +
ggplot2::scale_y_log10() +
ggplot2::geom_hline(yintercept = 1, linetype=2) +
ggplot2::labs(title=title) +
@ -66,5 +74,3 @@ ci_plot<- function(ds, x, y, vars=NULL, dec=3, lbls=NULL, title=NULL){
}

View File

@ -1,23 +1,28 @@
#' CPR check
#'
#' Checking validity of cpr number. Vectorised.
#' @param cpr cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.
#' @param cpr cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
#' Also mixed formatting. Vector or data frame column.
#' @keywords cpr
#'
#' @return Logical vector of cpr validity
#' @export
#'
#' @examples
#' fsd<-c("2310450637", "010190-2000", "010115-4000","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){
# Check validity of CPR number, format ddmmyy-xxxx
# Build upon data from this document: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
## OBS according to new description, not all valid CPR numbers apply to this modulus 11 rule.
# Build upon data from this document:
# https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
## OBS according to new description, not all valid CPR numbers
## apply to this modulus 11 rule.
message(
"OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule. \nSee the vignette 'Toolbox'")
"OBS: as per 2007 not all valid CPR numbers apply to modulus 11 rule.
\nSee the vignette 'Toolbox'")
str_length <- nchar(cpr)
# Calculating length of each element in vector
@ -26,10 +31,12 @@ cpr_check<-function(cpr){
# Subsetting strings to first 6 and last 4 characters to short format cpr.
cpr_matrix <- matrix(as.numeric(unlist(strsplit(cpr_short,""))),nrow=10)
# Splitting all strings by each character to list, unlisting and creating matrix. Default is by column.
# Splitting all strings by each character to list,
# unlisting and creating matrix. Default is by column.
test_vector <- c(4,3,2,7,6,5,4,3,2,1)
# Multiplication vector from https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
# Multiplication vector from
# https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
colSums(cpr_matrix*test_vector) %% 11 == 0
# Testing if modulus 11 == 0 of sums of matrix * multiplication vector.
@ -38,7 +45,8 @@ cpr_check<-function(cpr){
#' Extracting date of birth from CPR
#'
#' 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.
#' @param cpr cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
#' Also mixed formatting. Vector or data frame column.
#' @param format character string of dob date format. Default is "%d-%m-%Y".
#' @keywords cpr
#'
@ -47,11 +55,41 @@ cpr_check<-function(cpr){
#'
#' @examples
#' cpr_dob("231045-0637")
#' fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
#' fsd<-c("2310450637", "010190-2000", "010115-4000",
#' "300450-1030","010150-4021")
#' cpr_dob(fsd)
cpr_dob<-function(cpr, format="%d-%m-%Y"){
## Input as cpr-numbers in format ddmmyy-xxxx
## Build upon data from this document: https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
## Build upon data from this document:
## https://cpr.dk/media/12066/personnummeret-i-cpr.pdf
# Checks format and length
check_form <- (nchar(cpr)==10 & grepl("-", cpr)) |
(nchar(cpr)==11 & !grepl("[^A-Za-z0-9]", substr(cpr,7,7)))|
!nchar(cpr) %in% 10:11
if (any(check_form)){
warning("CPR length should be in format ddmmyy-xxxx or ddmmyyxxxx. Output will contain NAs")
}
str_length <- nchar(cpr)
# Calculating length of each element in vector
cpr_short_all <- paste0(substr(cpr,1,6),substr(cpr,str_length-3,str_length))
# Subsetting strings to first 6 and last 4 characters to short format cpr.
# Checks if letters in other positions than 1:7 or 10
check_lets <- grepl("\\D", paste0(substr(cpr_short_all,1,7),
substr(cpr_short_all,10,10)))
if (any(check_lets)) {
warning("Does only handle CPRs with letters in position 2 and 3 of the last 4 positions. Output will contain NAs")}
checks_any <- check_form | check_lets
non_na <- seq_along(cpr)[!checks_any]
cpr_short <- cpr_short_all[!checks_any]
dobs<-c()
@ -63,58 +101,54 @@ cpr_dob<-function(cpr, format="%d-%m-%Y"){
b36<-c(4,9)
b57<-c(5:8)
str_length <- nchar(cpr)
# Calculating length of each element in vector
cpr_short <- paste0(substr(cpr,1,6),substr(cpr,str_length-3,str_length))
# Subsetting strings to first 6 and last 4 characters to short format cpr.
year <- as.numeric(substr(cpr_short,5,6))
ddmmyy <- as.Date(substr(cpr_short,1,6),format="%d%m%y")
for (i in seq_along(cpr)){
for (i in seq_along(cpr_short)){
p56 <- year[i]
p8 <- substr(cpr_short[i],7,7)
# p8 is position 8 from the traditional cpr ddmmyy-xxxx, pos 7 in short version.
p7 <- substr(cpr_short[i],7,7)
birth <- ddmmyy[i]
if (((p56%in%a00)&&(p8%in%b00)))
if (((p56%in%a00)&&(p7%in%b00)))
{
dob<-as.Date(format(birth, format="19%y%m%d"), format="%Y%m%d")
}
else if (((p56%in%a36)&&(p8%in%b36)))
else if (((p56%in%a36)&&(p7%in%b36)))
{
dob<-as.Date(format(birth, format="20%y%m%d"), format="%Y%m%d")
}
else if ((!(p56%in%a36)&&(p8%in%b36)))
else if ((!(p56%in%a36)&&(p7%in%b36)))
{
dob<-as.Date(format(birth, format="19%y%m%d"), format="%Y%m%d")
}
else if (((p56%in%a57)&&(p8%in%b57)))
else if (((p56%in%a57)&&(p7%in%b57)))
{
dob<-as.Date(format(birth, format="20%y%m%d"), format="%Y%m%d")
}
else if ((!(p56%in%a57)&&(p8%in%b57)))
else if ((!(p56%in%a57)&&(p7%in%b57)))
{
dob<-as.Date(format(birth, format="18%y%m%d"), format="%Y%m%d")
}
else {print("Input contains data in wrong format")
}
dobs[i]<-dob
}
dobs <- format(as.Date(dobs, origin = "1970-01-01"), format = format)
format(as.Date(dobs, origin = "1970-01-01"), format = format)
merge(data.frame(index=seq_along(cpr),dobs=NA),
data.frame(index=non_na,dobs),
by = "index",
all=TRUE)[,3]
}
#' Determine female sex from CPR
#'
#' Just checking if last number of a string is equal or not.
#' @param cpr Vector. 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

View File

@ -1,12 +1,13 @@
#' Data frame of 200 cpr numbers
#'
#' This is just a repeated sample of 8 synthesized cpr-numbers for testing purposes.
#' 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/}
#' @source \url{https://da.wikipedia.org/wiki/231045-0637}
#' @usage data(cprs)
"cprs"

28
R/files_filter.R Normal file
View File

@ -0,0 +1,28 @@
#' @title Filter files in a folder
#' @description This function filters files in a folder based on the
#' provided filter.
#' @param folder.path character. Path of the folder to be filtered
#' @param filter.by character. Filter to be applied on the files
#' @param full.names logical. Whether to return full file names or not
#' @return character vector. Filtered files
#' @export
#'
#' @examples
#' # Gives path to files/folders with "tests" in the name in the
#' # working directory
#' files_filter(getwd(),"tests")
#' @import utils
files_filter <- function(folder.path,filter.by,full.names=TRUE){
#list all files in the folder
files <- list.files(path=folder.path, full.names=full.names)
#filter files
files[grepl(filter.by,files)]
}

View File

@ -22,7 +22,8 @@ utils::globalVariables(c("df","group","score","strata"))
#' @importFrom rankinPlot grottaBar
#'
#' @examples
#' generic_stroke(stRoke::talos, "rtreat", "mrs_6", variables = c("hypertension","diabetes","civil"))
#' generic_stroke(stRoke::talos, "rtreat", "mrs_6",
#' variables = c("hypertension","diabetes","civil"))
generic_stroke <- function(df, group, score, strata = NULL, variables = NULL)
{
# if (!is.factor(df[,group])){
@ -39,7 +40,9 @@ generic_stroke <- function(df, group, score, strata = NULL, variables = NULL)
colourScheme ="custom")
df[,score] <- factor(df[,score],ordered = TRUE)
f2 <- plot_olr(MASS::polr(formula(paste0(score,"~.")), data=df[,c(group, score, variables)], Hess=TRUE, method="logistic"), input="model")
f2 <- plot_olr(MASS::polr(formula(paste0(score,"~.")),
data=df[,c(group, score, variables)], Hess=TRUE,
method="logistic"), input="model")
list("Table 1" = t1, "Figure 1" = f1, "Figure 2" = f2)
}

View File

@ -1,12 +1,14 @@
utils::globalVariables(c("name","value","facet"))
#' Plot multidimensional cognitive test scores
#'
#' Plot index scores from five dimensional cognitive testing. Includes option to facet.
#' Plot index scores from five dimensional cognitive testing.
#' Includes option to facet.
#'
#' @param ds complete data frame
#' @param id colname of id column. Base for colouring
#' @param sub_plot main outcome scores variable to plot
#' @param scores variables to subset for plotting. Has to follow standard naming (is to be changed)
#' @param scores variables to subset for plotting. Has to follow standard
#' naming (is to be changed)
#' @param dom_names domain names for axis naming
#' @param facet.by variable to base facet_grid on
#'
@ -23,7 +25,11 @@ utils::globalVariables(c("name","value","facet"))
#'
#' @examples
#' index_plot(stRoke::score[score$event=="A",])
index_plot <- function(ds,id="id",sub_plot="_is",scores=c("_is","_lo","_up","_per"),dom_names=c("immediate","visuospatial","verbal","attention","delayed","total"),facet.by=NULL){
index_plot <- function(ds,id="id",sub_plot="_is",
scores=c("_is","_lo","_up","_per"),
dom_names=c("immediate","visuospatial","verbal",
"attention","delayed","total"),
facet.by=NULL){
if (length(facet.by)>1){stop("facet.by can be NULL or of length 1 only.")}
@ -44,7 +50,8 @@ index_plot <- function(ds,id="id",sub_plot="_is",scores=c("_is","_lo","_up","_pe
if (sub_plot=="_is"){
index_plot<-df_plot|>
ggplot2::ggplot(mapping = ggplot2::aes(x=name, y=value, color=factor(id), group=factor(id))) +
ggplot2::ggplot(mapping = ggplot2::aes(x=name, y=value, color=factor(id),
group=factor(id))) +
ggplot2::geom_point() +
ggplot2::geom_path() +
ggplot2::expand_limits(y=c(40,160)) +
@ -56,7 +63,8 @@ index_plot <- function(ds,id="id",sub_plot="_is",scores=c("_is","_lo","_up","_pe
if (sub_plot=="_per"){
index_plot<-df_plot|>
ggplot2::ggplot(mapping = ggplot2::aes(x=name, y=value, fill=factor(id)))+
ggplot2::ggplot(mapping = ggplot2::aes(x=name, y=value,
fill=factor(id)))+
ggplot2::geom_col(position = "dodge") +
ggplot2::expand_limits(y=c(0,100)) +
ggplot2::scale_y_continuous(breaks=seq(0,100,by=10)) +
@ -67,7 +75,8 @@ index_plot <- function(ds,id="id",sub_plot="_is",scores=c("_is","_lo","_up","_pe
if (!is.null(facet.by)){
index_plot + facet_grid(cols=vars(facet)) +
ggplot2::theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))
ggplot2::theme(axis.text.x = element_text(angle = 90,
vjust = 0.5, hjust=1))
} else {
index_plot

View File

@ -20,7 +20,8 @@
#' mrs_1~"One month mRS",
#' mrs_6~"Six months mRS",
#' '[Intercept]'~"Intercept")
#' stRoke::talos[vars] |> gtsummary::tbl_summary(label = label_select(labels_all,vars))
#' stRoke::talos[vars] |>
#' gtsummary::tbl_summary(label = label_select(labels_all,vars))
label_select<-function(lst,vec){
lst[match(vec,unlist(lapply(lst,function(i){i[[2]]})))]
}

View File

@ -34,7 +34,8 @@ utils::globalVariables(c("or","ord","lo","up"))
#' lm <- MASS::polr(ord~., data=iris, Hess=TRUE, method="logistic")
#' plot_olr(lm, input="model")
plot_olr<-function(x, title = NULL, dec=3, lbls=NULL, hori="OR (95 % CI)", vert="Variables", short=FALSE, input=c("model","df")){
plot_olr<-function(x, title = NULL, dec=3, lbls=NULL, hori="OR (95 % CI)",
vert="Variables", short=FALSE, input=c("model","df")){
if (input=="model"){
odds <- data.frame(cbind(exp(coef(x)), exp(confint(x))))
@ -47,9 +48,11 @@ plot_olr<-function(x, title = NULL, dec=3, lbls=NULL, hori="OR (95 % CI)", vert=
rodds<-round(odds, digits = dec)
if (!is.null(lbls)){
odds$vars<-paste0(lbls," \n",paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
odds$vars<-paste0(lbls," \n",
paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
} else {
odds$vars<-paste0(row.names(odds)," \n",paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
odds$vars<-paste0(row.names(odds)," \n",
paste0(rodds$or," [",rodds$lo,":",rodds$up,"]"))
}
ticks<-c(seq(0, 1, by =.1), seq(1, 10, by =1), seq(10, 100, by =10))

View File

@ -20,16 +20,20 @@
#' x <- 1:450
#' y <- 6:750
#' summary(quantile_cut(aa,groups=4,detail.list=FALSE)) ## Cuts quartiles
quantile_cut<-function (x, groups, y=NULL, na.rm = TRUE, group.names = NULL, ordered.f = FALSE, inc.outs=FALSE, detail.list=FALSE){
quantile_cut<-function (x, groups, y=NULL, na.rm = TRUE,
group.names = NULL, ordered.f = FALSE, inc.outs=FALSE,
detail.list=FALSE){
if (!is.null(y)){
q<-quantile(y, probs = seq(0, 1, 1/groups), na.rm = na.rm, names = TRUE, type = 7)
if (inc.outs){ # Setting cut boardes to include outliers in x compared to y.
q<-quantile(y, probs = seq(0, 1, 1/groups), na.rm = na.rm,
names = TRUE, type = 7)
if (inc.outs){ # Setting cut borders to include outliers in x compared to y.
q[1]<-min(x,na.rm = TRUE)
q[length(q)]<-max(x,na.rm = TRUE)
}
}
if (is.null(y)){
q<-quantile(x, probs = seq(0, 1, 1/groups), na.rm = na.rm, names = TRUE, type = 7)
q<-quantile(x, probs = seq(0, 1, 1/groups), na.rm = na.rm,
names = TRUE, type = 7)
}
d<-cut(x, q, include.lowest = TRUE, labels = group.names,

View File

@ -1,14 +1,16 @@
#' Download REDCap data
#'
#' Wrapper function for using REDCapR::redcap_read and REDCapRITS::REDCap_split including some clean-up.
#' Handles
#' Wrapper function for using REDCapR::redcap_read and REDCapRITS::REDCap_split
#' including some clean-up. Works with longitudinal projects with repeating
#' instruments.
#' @param uri REDCap database uri
#' @param token API token
#' @param records records to download
#' @param fields fields to download
#' @param events events to download
#' @param forms forms to download
#' @param generics vector of auto-generated generic variable names to ignore when discarding empty rows
#' @param generics vector of auto-generated generic variable names to
#' ignore when discarding empty rows
#'
#' @return list of instruments
#' @export
@ -21,9 +23,12 @@ read_redcap_tables <- function(uri,
fields=NULL,
events=NULL,
forms=NULL,
generics=c("record_id", "redcap_event_name", "redcap_repeat_instrument", "redcap_repeat_instance")){
generics=c("record_id", "redcap_event_name",
"redcap_repeat_instrument",
"redcap_repeat_instance")){
# Notes to self: Based on the metadata, this functionality could be introduced without using the REDCapRITS package.. To be tried..
# Notes to self: Based on the metadata, this functionality could be introduced
# without using the REDCapRITS package.. To be tried..
d <- REDCapR::redcap_read (redcap_uri = uri,
token = token,
@ -35,11 +40,14 @@ read_redcap_tables <- function(uri,
m <- REDCapR::redcap_metadata_read (redcap_uri = uri,token = token)
if (requireNamespace("REDCapRITS", quietly = TRUE)) {
l <- REDCapRITS::REDCap_split(d$data, m$data[m$data$field_name %in% names(d$data),], forms = "all")
l <- REDCapRITS::REDCap_split(d$data,
m$data[m$data$field_name %in% names(d$data),],
forms = "all")
} else {
cli::cli_abort(
c("x" = "The package REDCapRITS is not installed.",
"i" = "Please install REDCapRITS by running \"remotes::install_github('agdamsbo/REDCapRITS')\".")
"i" = "Please install REDCapRITS by running
\"remotes::install_github('agdamsbo/REDCapRITS')\".")
)
}

View File

@ -1,6 +1,7 @@
#' Data frame with sample data of cognitive testing score
#'
#' Contains non-identifiable organic trial data from a five-dimensional cognitive test.
#' Contains non-identifiable organic trial data from a
#' five-dimensional cognitive test.
#'
#' @format A data frame with 20 rows and 26 variables:
#' \describe{

View File

@ -1,6 +1,7 @@
#' Data frame with sample of TALOS data
#'
#' Contains of non-identifiable data from the [TALOS trial](https://doi.org/10.1161/STROKEAHA.117.020067/)
#' Contains of non-identifiable data from
#' the [TALOS trial](https://doi.org/10.1161/STROKEAHA.117.020067/)
#'
#' @format A data frame with 200 rows and 6 variables:
#' \describe{
@ -11,7 +12,7 @@
#' \item{diabetes}{Known diabetes}
#' \item{civil}{Cohabitation status}
#' }
#' @source \url{https://doi.org/10.1161/STROKEAHA.117.020067/}
#' @source \doi{10.1161/STROKEAHA.117.020067}
#' @usage data(talos)
"talos"

View File

@ -10,12 +10,7 @@ This is an R-toolbox of custom functions for convenient data management and anal
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.
# A few notes
The function `generic_stroke()`can be used with `data(talos)` or a custom data set to illustrate the classic analysis of mRS outcome from stroke trials.
In documenting and testing the package, I have used [OpenAI's](https://beta.openai.com/overview) chatgpt with [gpttools](https://jameshwade.github.io/gpttools/). The chatgpt is an interesting tool, that is in no way perfect, but it helps with tedious tasks. Both `gpttools` and [`gptstudio`](https://michelnivard.github.io/gptstudio/) are interesting implementations in R and RStudio.
# Source
## Source
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.

View File

@ -201,12 +201,12 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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 class="st">"rtreat"</span>, <span class="st">"mrs_6"</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="oxebipzbdp" 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;div id="ncpwthmtsm" 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;html {</span></span>
<span><span class="co">#&gt; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;</span></span>
<span><span class="co">#&gt; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #oxebipzbdp .gt_table {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; margin-left: auto;</span></span>
@ -231,7 +231,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_heading {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -243,12 +243,12 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_caption {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_title {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -260,7 +260,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_subtitle {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -272,13 +272,13 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_bottom_border {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_col_headings {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -293,7 +293,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_col_heading {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -313,7 +313,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_column_spanner_outer {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -325,15 +325,15 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_column_spanner_outer:first-child {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_column_spanner_outer:last-child {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_column_spanner {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -345,7 +345,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_group_heading {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -371,7 +371,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_empty_group_heading {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -386,15 +386,15 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_from_md &gt; :first-child {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_from_md &gt; :last-child {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -413,7 +413,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_stub {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -426,7 +426,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_stub_row_group {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -440,11 +440,11 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_row_group_first td {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_summary_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -454,16 +454,16 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_first_summary_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_first_summary_row.thick {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_last_summary_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -473,7 +473,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_grand_summary_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -483,7 +483,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_first_grand_summary_row {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -493,11 +493,11 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_striped {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_table_body {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -506,7 +506,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_footnotes {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -520,7 +520,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_footnote {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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-left: 4px;</span></span>
@ -529,7 +529,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_sourcenotes {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -543,7 +543,7 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_sourcenote {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>
@ -551,64 +551,64 @@ model plot (with <code><a href="../reference/ci_plot.html">stRoke::ci_plot()</a>
<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; #oxebipzbdp .gt_left {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_center {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_right {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_font_normal {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_font_bold {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_font_italic {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_super {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_footnote_marks {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .gt_footnote_marks {</span></span>
<span><span class="co">#&gt; font-style: italic;</span></span>
<span><span class="co">#&gt; font-weight: normal;</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; }</span></span>
<span><span class="co">#&gt; </span></span>
<span><span class="co">#&gt; #oxebipzbdp .gt_asterisk {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_indent_1 {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_indent_2 {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_indent_3 {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_indent_4 {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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; #oxebipzbdp .gt_indent_5 {</span></span>
<span><span class="co">#&gt; #ncpwthmtsm .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>

View File

@ -64,11 +64,11 @@
<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 toolbox</em>.
<em>stRoke: Clinical Stroke Research Toolbox</em>.
https://agdamsbo.github.io/stRoke/, https://github.com/agdamsbo/stRoke, https://agdamsbo.github.io/neuRo-group/.
</p>
<pre>@Manual{,
title = {stRoke: Clinical stroke research toolbox},
title = {stRoke: Clinical Stroke Research Toolbox},
author = {Andreas Gammelgaard Damsbo},
year = {2023},
note = {https://agdamsbo.github.io/stRoke/, https://github.com/agdamsbo/stRoke, https://agdamsbo.github.io/neuRo-group/},

View File

@ -9,12 +9,12 @@
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.">
<title>Clinical stroke research toolbox • stRoke</title>
<title>Clinical Stroke Research Toolbox • 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.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 toolbox">
<!-- 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 Toolbox">
<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.

View File

@ -4,5 +4,5 @@ pkgdown_sha: ~
articles:
redcap: redcap.html
toolbox: toolbox.html
last_built: 2023-01-05T09:19Z
last_built: 2023-01-10T12:06Z

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="This function filters files in a folder based on the provided filter."><title>Filter files in a folder — files_filter • 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.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."><!-- 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.23.1.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>
<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/redcap.html">Simple REDCap workflow</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="" 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 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

@ -101,12 +101,12 @@ To dos: modify grottaBar and include as own function.</p>
<div class="sourceCode"><pre class="sourceCode r"><code><span class="r-in"><span><span class="fu">generic_stroke</span><span class="op">(</span><span class="fu">stRoke</span><span class="fu">::</span><span class="va"><a href="talos.html">talos</a></span>, <span class="st">"rtreat"</span>, <span class="st">"mrs_6"</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="r-msg co"><span class="r-pr">#&gt;</span> Waiting for profiling to be done...</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> $`Table 1`</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;div id="umxtlfcsnb" 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 class="r-out co"><span class="r-pr">#&gt;</span> &lt;div id="otptyzevaf" 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 class="r-out co"><span class="r-pr">#&gt;</span> &lt;style&gt;html {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;</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> #umxtlfcsnb .gt_table {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_table {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> display: table;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-collapse: collapse;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-left: auto;</span>
@ -131,7 +131,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-left-color: #D3D3D3;</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> #umxtlfcsnb .gt_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: center;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #FFFFFF;</span>
@ -143,12 +143,12 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #umxtlfcsnb .gt_caption {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_caption {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 4px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 4px;</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> #umxtlfcsnb .gt_title {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_title {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 125%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: initial;</span>
@ -160,7 +160,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 0;</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> #umxtlfcsnb .gt_subtitle {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_subtitle {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 85%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: initial;</span>
@ -172,13 +172,13 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 0;</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> #umxtlfcsnb .gt_bottom_border {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_bottom_border {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #umxtlfcsnb .gt_col_headings {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_col_headings {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</span>
@ -193,7 +193,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #umxtlfcsnb .gt_col_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_col_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -213,7 +213,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> overflow-x: hidden;</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> #umxtlfcsnb .gt_column_spanner_outer {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_column_spanner_outer {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -225,15 +225,15 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 4px;</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> #umxtlfcsnb .gt_column_spanner_outer:first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_column_spanner_outer:first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 0;</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> #umxtlfcsnb .gt_column_spanner_outer:last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_column_spanner_outer:last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 0;</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> #umxtlfcsnb .gt_column_spanner {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_column_spanner {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</span>
@ -245,7 +245,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> width: 100%;</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> #umxtlfcsnb .gt_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -271,7 +271,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: left;</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> #umxtlfcsnb .gt_empty_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_empty_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding: 0.5px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
@ -286,15 +286,15 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: middle;</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> #umxtlfcsnb .gt_from_md &gt; :first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_from_md &gt; :first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-top: 0;</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> #umxtlfcsnb .gt_from_md &gt; :last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_from_md &gt; :last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-bottom: 0;</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> #umxtlfcsnb .gt_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -313,7 +313,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> overflow-x: hidden;</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> #umxtlfcsnb .gt_stub {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_stub {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -326,7 +326,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #umxtlfcsnb .gt_stub_row_group {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_stub_row_group {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -340,11 +340,11 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: top;</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> #umxtlfcsnb .gt_row_group_first td {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_row_group_first td {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</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> #umxtlfcsnb .gt_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-transform: inherit;</span>
@ -354,16 +354,16 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #umxtlfcsnb .gt_first_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_first_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</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> #umxtlfcsnb .gt_first_summary_row.thick {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_first_summary_row.thick {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</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> #umxtlfcsnb .gt_last_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_last_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -373,7 +373,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #umxtlfcsnb .gt_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-transform: inherit;</span>
@ -383,7 +383,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #umxtlfcsnb .gt_first_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_first_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -393,11 +393,11 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</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> #umxtlfcsnb .gt_striped {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_striped {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: rgba(128, 128, 128, 0.05);</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> #umxtlfcsnb .gt_table_body {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_table_body {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</span>
@ -406,7 +406,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #umxtlfcsnb .gt_footnotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_footnotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: none;</span>
@ -420,7 +420,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #umxtlfcsnb .gt_footnote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_footnote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin: 0px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 90%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 4px;</span>
@ -429,7 +429,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #umxtlfcsnb .gt_sourcenotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_sourcenotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: none;</span>
@ -443,7 +443,7 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #umxtlfcsnb .gt_sourcenote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_sourcenote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 90%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 4px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 4px;</span>
@ -451,64 +451,64 @@ To dos: modify grottaBar and include as own function.</p>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #umxtlfcsnb .gt_left {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_left {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: left;</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> #umxtlfcsnb .gt_center {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_center {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: center;</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> #umxtlfcsnb .gt_right {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_right {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: right;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-variant-numeric: tabular-nums;</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> #umxtlfcsnb .gt_font_normal {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_font_normal {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: normal;</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> #umxtlfcsnb .gt_font_bold {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_font_bold {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: bold;</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> #umxtlfcsnb .gt_font_italic {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_font_italic {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-style: italic;</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> #umxtlfcsnb .gt_super {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_super {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 65%;</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> #umxtlfcsnb .gt_footnote_marks {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_footnote_marks {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-style: italic;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: normal;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 75%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: 0.4em;</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> #umxtlfcsnb .gt_asterisk {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_asterisk {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: 0;</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> #umxtlfcsnb .gt_indent_1 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_indent_1 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 5px;</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> #umxtlfcsnb .gt_indent_2 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_indent_2 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 10px;</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> #umxtlfcsnb .gt_indent_3 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_indent_3 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 15px;</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> #umxtlfcsnb .gt_indent_4 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_indent_4 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 20px;</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> #umxtlfcsnb .gt_indent_5 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #otptyzevaf .gt_indent_5 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 25px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;/style&gt;</span>

View File

@ -93,6 +93,11 @@
<dd>Data frame of 200 cpr numbers</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>

View File

@ -92,12 +92,12 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<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">stRoke</span><span class="fu">::</span><span class="va"><a href="talos.html">talos</a></span><span class="op">[</span><span class="va">vars</span><span class="op">]</span> <span class="op">|&gt;</span> <span class="fu">gtsummary</span><span class="fu">::</span><span class="fu"><a href="https://www.danieldsjoberg.com/gtsummary/reference/tbl_summary.html" class="external-link">tbl_summary</a></span><span class="op">(</span>label <span class="op">=</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 class="op">)</span></span></span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;div id="ggsdbzrbyq" 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 class="r-out co"><span class="r-pr">#&gt;</span> &lt;div id="twqogyttqy" 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 class="r-out co"><span class="r-pr">#&gt;</span> &lt;style&gt;html {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;</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> #ggsdbzrbyq .gt_table {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_table {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> display: table;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-collapse: collapse;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-left: auto;</span>
@ -122,7 +122,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-left-color: #D3D3D3;</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> #ggsdbzrbyq .gt_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: center;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #FFFFFF;</span>
@ -134,12 +134,12 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #ggsdbzrbyq .gt_caption {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_caption {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 4px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 4px;</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> #ggsdbzrbyq .gt_title {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_title {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 125%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: initial;</span>
@ -151,7 +151,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 0;</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> #ggsdbzrbyq .gt_subtitle {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_subtitle {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 85%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: initial;</span>
@ -163,13 +163,13 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 0;</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> #ggsdbzrbyq .gt_bottom_border {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_bottom_border {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #ggsdbzrbyq .gt_col_headings {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_col_headings {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</span>
@ -184,7 +184,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #ggsdbzrbyq .gt_col_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_col_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -204,7 +204,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> overflow-x: hidden;</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> #ggsdbzrbyq .gt_column_spanner_outer {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_column_spanner_outer {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -216,15 +216,15 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 4px;</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> #ggsdbzrbyq .gt_column_spanner_outer:first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_column_spanner_outer:first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 0;</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> #ggsdbzrbyq .gt_column_spanner_outer:last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_column_spanner_outer:last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 0;</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> #ggsdbzrbyq .gt_column_spanner {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_column_spanner {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</span>
@ -236,7 +236,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> width: 100%;</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> #ggsdbzrbyq .gt_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -262,7 +262,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: left;</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> #ggsdbzrbyq .gt_empty_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_empty_group_heading {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding: 0.5px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
@ -277,15 +277,15 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: middle;</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> #ggsdbzrbyq .gt_from_md &gt; :first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_from_md &gt; :first-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-top: 0;</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> #ggsdbzrbyq .gt_from_md &gt; :last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_from_md &gt; :last-child {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin-bottom: 0;</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> #ggsdbzrbyq .gt_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -304,7 +304,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> overflow-x: hidden;</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> #ggsdbzrbyq .gt_stub {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_stub {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -317,7 +317,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #ggsdbzrbyq .gt_stub_row_group {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_stub_row_group {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
@ -331,11 +331,11 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: top;</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> #ggsdbzrbyq .gt_row_group_first td {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_row_group_first td {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</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> #ggsdbzrbyq .gt_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-transform: inherit;</span>
@ -345,16 +345,16 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #ggsdbzrbyq .gt_first_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_first_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</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> #ggsdbzrbyq .gt_first_summary_row.thick {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_first_summary_row.thick {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</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> #ggsdbzrbyq .gt_last_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_last_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -364,7 +364,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #ggsdbzrbyq .gt_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-transform: inherit;</span>
@ -374,7 +374,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #ggsdbzrbyq .gt_first_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_first_grand_summary_row {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 8px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 5px;</span>
@ -384,11 +384,11 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</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> #ggsdbzrbyq .gt_striped {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_striped {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: rgba(128, 128, 128, 0.05);</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> #ggsdbzrbyq .gt_table_body {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_table_body {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-style: solid;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-width: 2px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-top-color: #D3D3D3;</span>
@ -397,7 +397,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-color: #D3D3D3;</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> #ggsdbzrbyq .gt_footnotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_footnotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: none;</span>
@ -411,7 +411,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #ggsdbzrbyq .gt_footnote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_footnote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> margin: 0px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 90%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-left: 4px;</span>
@ -420,7 +420,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #ggsdbzrbyq .gt_sourcenotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_sourcenotes {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> color: #333333;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> background-color: #FFFFFF;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> border-bottom-style: none;</span>
@ -434,7 +434,7 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> border-right-color: #D3D3D3;</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> #ggsdbzrbyq .gt_sourcenote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_sourcenote {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 90%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-top: 4px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-bottom: 4px;</span>
@ -442,64 +442,64 @@ Alternative is to use attributes, eg from <code><a href="https://hbiostat.org/R/
<span class="r-out co"><span class="r-pr">#&gt;</span> padding-right: 5px;</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> #ggsdbzrbyq .gt_left {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_left {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: left;</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> #ggsdbzrbyq .gt_center {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_center {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: center;</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> #ggsdbzrbyq .gt_right {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_right {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-align: right;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-variant-numeric: tabular-nums;</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> #ggsdbzrbyq .gt_font_normal {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_font_normal {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: normal;</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> #ggsdbzrbyq .gt_font_bold {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_font_bold {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: bold;</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> #ggsdbzrbyq .gt_font_italic {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_font_italic {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-style: italic;</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> #ggsdbzrbyq .gt_super {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_super {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 65%;</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> #ggsdbzrbyq .gt_footnote_marks {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_footnote_marks {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-style: italic;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-weight: normal;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 75%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: 0.4em;</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> #ggsdbzrbyq .gt_asterisk {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_asterisk {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> font-size: 100%;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> vertical-align: 0;</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> #ggsdbzrbyq .gt_indent_1 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_indent_1 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 5px;</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> #ggsdbzrbyq .gt_indent_2 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_indent_2 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 10px;</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> #ggsdbzrbyq .gt_indent_3 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_indent_3 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 15px;</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> #ggsdbzrbyq .gt_indent_4 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_indent_4 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 20px;</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> #ggsdbzrbyq .gt_indent_5 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> #twqogyttqy .gt_indent_5 {</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> text-indent: 25px;</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> }</span>
<span class="r-out co"><span class="r-pr">#&gt;</span> &lt;/style&gt;</span>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 90 KiB

View File

@ -117,8 +117,8 @@
<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,254] (254,523] (523,759] (759,1e+03] </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 501 500 499 500 </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> [1,246] (246,500] (500,760] (760,1e+03] </span>
<span class="r-out co"><span class="r-pr">#&gt;</span> 504 496 502 498 </span>
</code></pre></div>
</div>
</main><aside class="col-md-3"><nav id="toc"><h2>On this page</h2>

View File

@ -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="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."><title>stRoke: Clinical stroke research toolbox — 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.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 toolbox — 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 the agdamsbo/daDoctoR-package, and new functions has been added."><!-- 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="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."><title>stRoke: Clinical Stroke Research Toolbox — 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.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 Toolbox — 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 the agdamsbo/daDoctoR-package, and new functions has been added."><!-- 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>
@ -47,7 +47,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>stRoke: Clinical stroke research toolbox</h1>
<img src="" class="logo" alt=""><h1>stRoke: Clinical Stroke Research Toolbox</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>

File diff suppressed because one or more lines are too long

View File

@ -45,6 +45,9 @@
<url>
<loc>/reference/cprs.html</loc>
</url>
<url>
<loc>/reference/files_filter.html</loc>
</url>
<url>
<loc>/reference/generic_stroke.html</loc>
</url>

View File

@ -40,17 +40,22 @@ eg
forrestplot
gg
ggplot
glm
goodpractices
gp
gpttools
grotta
grottaBar
gtsummary
https
jss
lm
lst
mRS
neuRo
olr
polr
recognised
uri
vec
www

View File

@ -26,7 +26,9 @@ Calculate age in years, months, or days
trunc(age_calc(as.Date("1945-10-23"),as.Date("2018-09-30")))
}
\references{
Becker, J.P. (2020). eeptools: An R Package for Teaching and Learning Ecology and Evolutionary Biology. Journal of Statistical Software, 93(2), 1-27. doi: 10.18637/jss.v093.i02
Becker, J.P. (2020). eeptools: An R Package for Teaching and Learning Ecology
and Evolutionary Biology. Journal of Statistical Software, 93(2), 1-27.
doi: 10.18637/jss.v093.i02
}
\seealso{
\code{\link[lubridate]{time_length}}

View File

@ -25,7 +25,8 @@ ci_plot(ds, x, y, vars = NULL, dec = 3, lbls = NULL, title = NULL)
ggplot element
}
\description{
Horizontal forest plot of point estimate with confidence intervals. Includes dichotomous or olr, depending on number of levels in "x".
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.
}
\examples{

View File

@ -7,7 +7,8 @@
cpr_check(cpr)
}
\arguments{
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.}
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.}
}
\value{
Logical vector of cpr validity
@ -16,7 +17,8 @@ Logical vector of cpr validity
Checking validity of cpr number. Vectorised.
}
\examples{
fsd<-c("2310450637", "010190-2000", "010115-4000","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))

View File

@ -7,7 +7,8 @@
cpr_dob(cpr, format = "\%d-\%m-\%Y")
}
\arguments{
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx. Also mixed formatting. Vector or data frame column.}
\item{cpr}{cpr-numbers as ddmmyy"-."xxxx or ddmmyyxxxx.
Also mixed formatting. Vector or data frame column.}
\item{format}{character string of dob date format. Default is "\%d-\%m-\%Y".}
}
@ -19,7 +20,8 @@ For easy calculation. Does not handle cprs with letters (interim cpr)
}
\examples{
cpr_dob("231045-0637")
fsd<-c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021")
fsd<-c("2310450637", "010190-2000", "010115-4000",
"300450-1030","010150-4021")
cpr_dob(fsd)
}
\keyword{cpr}

View File

@ -7,7 +7,8 @@
cpr_female(cpr)
}
\arguments{
\item{cpr}{Vector. 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

View File

@ -11,12 +11,13 @@ A data frame with 200 rows and 1 variable:
}
}
\source{
\url{https://da.wikipedia.org/wiki/231045-0637/}
\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.
This is just a repeated sample of 8 synthesized cpr-numbers
for testing purposes.
}
\keyword{datasets}

27
man/files_filter.Rd Normal file
View File

@ -0,0 +1,27 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/files_filter.R
\name{files_filter}
\alias{files_filter}
\title{Filter files in a folder}
\usage{
files_filter(folder.path, filter.by, full.names = TRUE)
}
\arguments{
\item{folder.path}{character. Path of the folder to be filtered}
\item{filter.by}{character. Filter to be applied on the files}
\item{full.names}{logical. Whether to return full file names or not}
}
\value{
character vector. Filtered files
}
\description{
This function filters files in a folder based on the
provided filter.
}
\examples{
# Gives path to files/folders with "tests" in the name in the
# working directory
files_filter(getwd(),"tests")
}

View File

@ -26,5 +26,6 @@ Please just use this function for illustration purposes.
To dos: modify grottaBar and include as own function.
}
\examples{
generic_stroke(stRoke::talos, "rtreat", "mrs_6", variables = c("hypertension","diabetes","civil"))
generic_stroke(stRoke::talos, "rtreat", "mrs_6",
variables = c("hypertension","diabetes","civil"))
}

View File

@ -20,7 +20,8 @@ index_plot(
\item{sub_plot}{main outcome scores variable to plot}
\item{scores}{variables to subset for plotting. Has to follow standard naming (is to be changed)}
\item{scores}{variables to subset for plotting. Has to follow standard
naming (is to be changed)}
\item{dom_names}{domain names for axis naming}
@ -30,7 +31,8 @@ index_plot(
ggplot element
}
\description{
Plot index scores from five dimensional cognitive testing. Includes option to facet.
Plot index scores from five dimensional cognitive testing.
Includes option to facet.
}
\examples{
index_plot(stRoke::score[score$event=="A",])

View File

@ -27,5 +27,6 @@ hypertension~"Known hypertension",
mrs_1~"One month mRS",
mrs_6~"Six months mRS",
'[Intercept]'~"Intercept")
stRoke::talos[vars] |> gtsummary::tbl_summary(label = label_select(labels_all,vars))
stRoke::talos[vars] |>
gtsummary::tbl_summary(label = label_select(labels_all,vars))
}

View File

@ -28,14 +28,16 @@ read_redcap_tables(
\item{forms}{forms to download}
\item{generics}{vector of auto-generated generic variable names to ignore when discarding empty rows}
\item{generics}{vector of auto-generated generic variable names to
ignore when discarding empty rows}
}
\value{
list of instruments
}
\description{
Wrapper function for using REDCapR::redcap_read and REDCapRITS::REDCap_split including some clean-up.
Handles
Wrapper function for using REDCapR::redcap_read and REDCapRITS::REDCap_split
including some clean-up. Works with longitudinal projects with repeating
instruments.
}
\examples{
# Examples will be provided later

View File

@ -39,6 +39,7 @@ A data frame with 20 rows and 26 variables:
data(score)
}
\description{
Contains non-identifiable organic trial data from a five-dimensional cognitive test.
Contains non-identifiable organic trial data from a
five-dimensional cognitive test.
}
\keyword{datasets}

View File

@ -4,7 +4,7 @@
\name{stRoke-package}
\alias{stRoke}
\alias{stRoke-package}
\title{stRoke: Clinical stroke research toolbox}
\title{stRoke: Clinical Stroke Research Toolbox}
\description{
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.
}

View File

@ -16,12 +16,13 @@ A data frame with 200 rows and 6 variables:
}
}
\source{
\url{https://doi.org/10.1161/STROKEAHA.117.020067/}
\doi{10.1161/STROKEAHA.117.020067}
}
\usage{
data(talos)
}
\description{
Contains of non-identifiable data from the \href{https://doi.org/10.1161/STROKEAHA.117.020067/}{TALOS trial}
Contains of non-identifiable data from
the \href{https://doi.org/10.1161/STROKEAHA.117.020067/}{TALOS trial}
}
\keyword{datasets}

View File

@ -11,10 +11,18 @@ test_that("age_calc works correctly for years", {
expect_equal(age_calc(as.Date("2000-01-01"), as.Date("2020-01-01"), units = "years"), 20)
})
test_that("age_calc gives error if enddate < dob", {
expect_error(age_calc(as.Date("2020-01-01"), as.Date("2000-01-01"), units = "years"))
})
test_that("age_calc works correctly for months", {
expect_equal(age_calc(as.Date("2000-01-01"), as.Date("2020-01-01"), units = "months"), 240)
})
test_that("age_calc works correctly for months", {
expect_equal(round(age_calc(as.Date("2000-07-07"), as.Date("2020-01-01"), units = "months")), 234)
})
test_that("age_calc works correctly for days", {
testthat::expect_equal(age_calc(as.Date("2000-01-01"), as.Date("2020-01-01"), units = "days"), 7305)
testthat::expect_length(age_calc(as.Date("2000-01-01"), as.Date("2020-01-01"), units = "days"), 1)
@ -27,3 +35,7 @@ test_that("age_calc works correctly with leap years and precise set to TRUE", {
test_that("age_calc throws an error when enddate is before dob", {
expect_error(age_calc(as.Date("2020-01-01"), as.Date("2000-01-01"), units = "years"))
})
test_that("age_calc throws an error when wrong unit", {
expect_error(age_calc(as.Date("2020-01-01"), as.Date("2000-01-01"), units = "hours"))
})

View File

@ -1,8 +1,36 @@
# Unit Test - gpttools
test_that("ci_plot produces a valid plot, OLR", {
data(talos)
talos[,"mrs_1"]<-factor(talos[,"mrs_1"],ordered=TRUE)
testthat::expect_true(inherits(ci_plot(ds = talos, x = "rtreat",
y = "mrs_1",
vars = c("hypertension","diabetes")),
"ggplot"))
})
test_that("ci_plot produces a valid plot", {
data(talos)
talos[,"mrs_1"]<-factor(talos[,"mrs_1"],ordered=TRUE)
talos$bin <- factor(sample(1:2, size = nrow(talos), replace = TRUE))
testthat::expect_true(inherits(ci_plot(ds = talos, x = "rtreat", y = "mrs_1", vars = c("hypertension","diabetes")), "ggplot"))
talos[,"mrs_1"]<-factor(ifelse(talos[,"mrs_1"] %in% c("0","1"),1,2))
testthat::expect_true(inherits(ci_plot(ds = talos, x = "rtreat",
y = "mrs_1",
vars = c("hypertension","diabetes")),
"ggplot"))
})
test_that("ci_plot gives error if outcome is not factor", {
data(talos)
testthat::expect_error(ci_plot(ds = talos, x = "rtreat", y = "mrs_1",
vars = c("hypertension","diabetes")))
})
test_that("ci_plot produces a valid plot", {
data(talos)
talos[,"mrs_1"]<-factor(ifelse(talos[,"mrs_1"] %in% c("0","1"),1,2))
testthat::expect_true(inherits(ci_plot(ds = talos, x = "rtreat",
y = "mrs_1",
vars = c("hypertension","diabetes"),
lbls = c("Intercept","Placebo",
"Hypertension","Diabetes")),
"ggplot"))
})

View File

@ -8,18 +8,34 @@ testthat::test_that("cpr_check() 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"))
cpr <- c("2310450637", "010115-4000", "0101896000",
"010189-3000","300450-1030",
"010219-7021","010150-4021")
testthat::expect_type(cpr_dob(cpr), "character")
testthat::expect_length(cpr_dob(cpr), 7)
})
testthat::test_that("cpr_dob() works for vectors,
giving expected warnings and NAs", {
cpr <- c("2310450637", "010115-4000", "0101896000",
"010189-3000","01018AAAL9","300450-1030",
"010219-7021","0039-7021","010150-4021")
result <- suppressWarnings(cpr_dob(cpr))
testthat::expect_type(result, "character")
testthat::expect_length(result, 6)
testthat::expect_length(result, 9)
testthat::expect_true(any(is.na(result)))
testthat::expect_warning(cpr_dob(cpr))
})
################################################################################
testthat::test_that("cpr_female() works for vectors, giving logicals", {
result <- cpr_female(c("2310450637", "010115-4000", "0101896000","010189-3000","300450-1030","010150-4021"))
result <- cpr_female(c("2310450637", "010115-4000", "0101896000",
"010189-3000","300450-1030","010150-4021"))
testthat::expect_type(result, "logical")
testthat::expect_length(result, 6)
testthat::expect_equal(result[2], TRUE)
})
################################################################################
################################################################################

View File

@ -0,0 +1,4 @@
test_that("files_filter() correctly filters files", {
expect_type(files_filter(getwd(),"tests"),
"character")
})

View File

@ -1,3 +1,21 @@
test_that("multiplication works", {
test_that("index_plot() works!", {
testthat::expect_type(index_plot(stRoke::score[score$event=="A",]), "list")
testthat::expect_true(inherits(
index_plot(stRoke::score[score$event=="A",]), "ggplot"))
testthat::expect_type(index_plot(stRoke::score[score$event=="A",],
sub_plot = "_per"), "list")
testthat::expect_true(inherits(
index_plot(stRoke::score[score$event=="A",],sub_plot = "_per"), "ggplot"))
testthat::expect_error(index_plot(stRoke::score[score$event=="A",],
sub_plot = "_per",
facet.by = c("id","event")))
testthat::expect_type(index_plot(stRoke::score,
sub_plot = "_per",
facet.by = "event"), "list")
testthat::expect_true(inherits(
index_plot(stRoke::score[score$event=="A",],
sub_plot = "_per",
facet.by = "event"), "ggplot"))
})

View File

@ -6,7 +6,19 @@ test_that("quatile_cut() works for detail.list==FALSE", {
################################################################################
test_that("quatile_cut() works for detail.list==FALSE", {
test_that("quatile_cut() works for inc.outs==TRUE", {
result <- quantile_cut(iris$Sepal.Length,3,y=iris$Sepal.Length+3,inc.outs=FALSE)
expect_true(any(is.na(result)))
result <- quantile_cut(iris$Sepal.Length,3,y=iris$Sepal.Length+3,inc.outs=TRUE)
expect_false(any(is.na(result)))
expect_equal(length(levels(result)), 3)
expect_s3_class(result, "factor")
})
################################################################################
test_that("quatile_cut() works for detail.list==TRUE", {
result <- quantile_cut(iris$Sepal.Length,3,detail.list=TRUE)
expect_length(result, 2)
expect_type(result, "list")
@ -26,3 +38,4 @@ test_that("quantile_cut works correctly", {
################################################################################
range(iris$Sepal.Length)

View File

@ -24,6 +24,8 @@ My own toolbox in my small workshop is a mix of some old, worn, well proven tool
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.
In documenting and testing the package, I have used [OpenAI's](https://beta.openai.com/overview) chatgpt with [gpttools](https://jameshwade.github.io/gpttools/). The chatgpt is an interesting tool, that is in no way perfect, but it helps with tedious tasks. Both `gpttools` and [`gptstudio`](https://michelnivard.github.io/gptstudio/) are interesting implementations in R and RStudio.
## CPR manipulations {#cpr-intro}
Note that, if handled, CPR numbers (social security numbers) should be handled with care as they a considered highly sensitive data.
@ -66,7 +68,7 @@ cpr_dob(c("2310450637", "010190-2000", "010115-4000","300450-1030","010150-4021"
Gives logical vector of whether female gender from last digit of CPR.
```{r cpr_female-example}
cpr_female(stRoke::cprs[,1])
table(cpr_female(stRoke::cprs[,1]))
```
## Plotting