Skip to content

Commit

Permalink
multiple updates and additions. see 'NEWS.md'
Browse files Browse the repository at this point in the history
  • Loading branch information
agdamsbo committed Oct 10, 2024
1 parent 559f9de commit 6434165
Show file tree
Hide file tree
Showing 18 changed files with 300 additions and 423 deletions.
10 changes: 7 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: stRoke
Title: Clinical Stroke Research
Version: 24.2.1
Version: 24.10.1
Authors@R:
person("Andreas Gammelgaard", "Damsbo", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154"))
Expand All @@ -17,15 +17,19 @@ BugReports: https://github.com/agdamsbo/stRoke/issues
License: GPL-3
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
LazyData: true
Suggests:
knitr,
rmarkdown,
testthat,
git2r,
here,
spelling
spelling,
usethis,
pak,
roxygen2,
devtools
Config/testthat/edition: 3
Imports:
calendar,
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# stRoke 24.2.1
# stRoke 24.10.1

### Functions:

Expand All @@ -8,8 +8,12 @@

* UPDATE: `add_padding()` updated to include option to add leading and/or tailing string with `lead` or `tail`.

* Moving: The following functions are moved to `agdamsbo/project.aid` to focus on (stroke) trial related functions: `str_extract()`.

* NEW: `mfi_calc()` calculates domain scores from the MFI questionnaire. Takes data frame of 20 ordered as the questionnaire. Default is to reverse questions with reverse scoring.

Checks set up with `rhub` v2

# stRoke 23.9.1

### Functions:
Expand Down
4 changes: 2 additions & 2 deletions R/ci_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ ci_plot <-
title = NULL,
method = "auto") {

if (!method %in% c("auto", "model"))
stop("Method has to either 'auto' or 'model'")
if (!method %in% c("auto", "model")){
stop("Method has to either 'auto' or 'model'")}

if (method == "auto") {
if (!is.factor(ds[, y]))
Expand Down
1 change: 1 addition & 0 deletions R/ds2ical.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
utils::globalVariables(c("DTSTART"))
#' Convert data set to ical file
#'
#' @param data data set
Expand Down
4 changes: 2 additions & 2 deletions R/generic_stroke.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ generic_stroke <-
gtsummary::add_overall()

x <- table(df[, c(group, score, strata)])
f1 <- rankinPlot::grottaBar(
f1 <- suppressWarnings(rankinPlot::grottaBar(
x = x,
groupName = group,
scoreName = score,
strataName = strata,
colourScheme = "custom"
)
))

df[, score] <- factor(df[, score], ordered = TRUE)

Expand Down
3 changes: 2 additions & 1 deletion R/mfi_calc.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#' Title
utils::globalVariables(c("ndx"))
#' Reverses relevant MFI subscores
#'
#' @param d data frame or tibble
#' @param var numeric vector of indices of columns to reverse
Expand Down
4 changes: 3 additions & 1 deletion R/str_extract.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#' Extract string based on regex pattern
#'
#'
#' DEPRECATION: moved to `agdamsbo/project.aid`
#'
#' Use base::strsplit to
#' @param d vector of character strings
#' @param pattern regex pattern to match
Expand Down
2 changes: 1 addition & 1 deletion data-raw/cprs.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ usethis::use_data(cprs, overwrite = TRUE)
cprs <- data.frame(cpr=sample(c("2310450637", "010115-4000", "0101896000",
"010189-3000","300450-1030","010150-4021",
"011085-AKE3","0101EJ-ATW3"),200,TRUE))
save(cprs,file="cprs.rda")
save(cprs,file="data/cprs.rda")
Binary file modified data/cprs.rda
Binary file not shown.
4 changes: 2 additions & 2 deletions man/multi_rev.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/str_extract.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6434165

Please sign in to comment.