Skip to content

Commit

Permalink
migrated function tests with functions moved to agdamsbo/project.aid
Browse files Browse the repository at this point in the history
  • Loading branch information
agdamsbo committed Oct 24, 2024
1 parent 7823d67 commit 34be1df
Show file tree
Hide file tree
Showing 30 changed files with 19 additions and 575 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Version: 24.10.1
Authors@R:
person("Andreas Gammelgaard", "Damsbo", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-7559-1154"))
Description: This is an R-toolbox of custom functions for convenient data management
and analysis in clinical health research and teaching.
Description: A collection of tools for clinical trial data management and
analysis in research and teaching.
The package is mainly collected for personal use, but any use beyond that is encouraged.
This package has migrated functions from 'agdamsbo/daDoctoR', and new functions has been added.
Version follows months and year. See NEWS/Changelog for release notes.
Expand Down Expand Up @@ -34,7 +34,6 @@ Imports:
calendar,
dplyr,
ggplot2,
glue,
grDevices,
gtsummary,
lubridate,
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export(cpr_check)
export(cpr_dob)
export(cpr_female)
export(ds2dd)
export(ds2ical)
export(files_filter)
export(generic_stroke)
export(index_plot)
Expand Down
8 changes: 2 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@

### Functions:

* NEW: `ds2ical()` converts data set to ical format with easy glue string for summary and description. Export .ics file with `calendar::ic_write()`.
* UPDATE: `pase_calc()` updated for uniform column naming in output as well as streamlining the function a bit.

* UPDATE: `pase_calc()` updated for uniform column naming in output as well as streamlining the function a bit.

* 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()`.
* Moving: The following functions are moved to `agdamsbo/project.aid` to focus on (stroke) trial related functions: `str_extract()`, `add_padding()`, `age_calc()`, `chunks_of_n()`, `contrast_text()`, `files_filter()`, `quantile_cut()`, `write_ical()`.

* 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.

Expand Down
2 changes: 1 addition & 1 deletion R/add_padding.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Add padding to string
#' MOVED Add padding to string
#'
#' @param d vector of strings or numbers
#' @param length final string length
Expand Down
2 changes: 1 addition & 1 deletion R/chunks_of_n.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Split to chunks of size n
#' MOVED Split to chunks of size n
#'
#' @param d data. Can be vector or data frame.
#' @param n number of chunks
Expand Down
4 changes: 1 addition & 3 deletions R/contrast_text.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


#' @title Contrast Text Color
#' MOVED Contrast Text Color
#' @description Calculates the best contrast text color for a given
#' background color.
#' @param background A hex/named color value that represents the background.
Expand Down
66 changes: 0 additions & 66 deletions R/ds2ical.R

This file was deleted.

2 changes: 1 addition & 1 deletion R/files_filter.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


#' @title Filter files in a folder
#' MOVED 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
Expand Down
2 changes: 1 addition & 1 deletion R/quantile_cut.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Easy function for splitting numeric variable in quantiles
#' MOVED Easy function for splitting numeric variable in quantiles
#'
#' Using base/stats functions cut() and quantile().
#'
Expand Down
2 changes: 1 addition & 1 deletion R/write_ical.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


#' Write ical object
#' MOVED Write ical object
#'
#' This function creates an ical file based on a data frame with mixed events.
#' Export as .ics file using `calendar::ic_write()`.
Expand Down
4 changes: 2 additions & 2 deletions man/add_padding.Rd

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

4 changes: 2 additions & 2 deletions man/chunks_of_n.Rd

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

2 changes: 1 addition & 1 deletion man/contrast_text.Rd

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

51 changes: 0 additions & 51 deletions man/ds2ical.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion man/files_filter.Rd

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

2 changes: 1 addition & 1 deletion man/quantile_cut.Rd

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

2 changes: 1 addition & 1 deletion man/stRoke-package.Rd

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

2 changes: 1 addition & 1 deletion man/write_ical.Rd

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

Binary file removed tests/testthat/data/test1.png
Binary file not shown.
Binary file removed tests/testthat/data/test2.png
Binary file not shown.
Binary file removed tests/testthat/data/test3.png
Binary file not shown.
17 changes: 0 additions & 17 deletions tests/testthat/test-add_padding.R

This file was deleted.

72 changes: 0 additions & 72 deletions tests/testthat/test-age_calc.R

This file was deleted.

Loading

0 comments on commit 34be1df

Please sign in to comment.