This version marks a significant change in the contents and focus of this package. Going forward I will include functions with a focus on handling clinical trial data from my own stroke research.
Other functions for general data management an project management has been migrated to the project.aid
package, which is moving towards CRAN submission. Install dev-version with pak::pak("agdamsbo/project.aid")
.
UPDATE: pase_calc()
updated for uniform column naming in output as well as streamlining the function a bit.
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.
Checks set up with rhub
v2
NEW: chunks_of_n()
uses split()
to separate supplied vector or data frame into chunks of n. Flags to set if all but the last chunks should be exactly size n, or if they should be evenly sized of max n. Labels can be provided including regex pattern for subject naming to include in chunk names.
NEW: n_chunks()
is the opposite of chunks_of_n()
and is simply a wrapper for this function to create list of n chunks based of provided vector or data frame.
NEW: str_extract()
will extract the substring of a character string given by a regex pattern. Came to be as a helper function for labelling chunks in chunks_of_n()
, but will be useful on its own. Other functions doing the same exists, but this is my take only using base R. Draws on REDCapCAST::strsplitx()
, where splits can be performed around a pattern.
NEW: add_padding()
was created out of frustration. I wanted to add padding using sprintf("%0s",string)
, in examples for the above, but it would fail when rendering on Windows. Say hello to another function. Just very small. Defaults to adding leading zeros, to get all string to equal length with the longer string supplied.
Deprecation: ds2dd()
moved to REDCapCAST::ds2dd()
as this is where it belongs.
ds2dd()
bug after first practical implementation.pase_calc()
function calculates PASE scores from raw questionnaire data. Gives sub scores as well and returns basic data quality and completeness checks. Acknowledges the difference between the scoring manual and the article by Washburn PA. et al. (1999) on including sitting work in the score calculations.pase
sample questionnaire data. Non-identifiable and for use with the pase_calc()
function.library(calendar)
for easy conversion of spreadsheets to ical object. Export an .ics file using calendar::ic_write()
.library(genodds)
. The function is based on the spreadsheet provided by the authors. A print.win_Prop is also added for printing....and probably some more.
format=
.NEWS.md
file to track changes to the package.