Skip to content

Commit

Permalink
version 0.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerpittman authored and cran-robot committed May 25, 2024
1 parent 3710e45 commit d89656e
Show file tree
Hide file tree
Showing 39 changed files with 528 additions and 97 deletions.
19 changes: 9 additions & 10 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: BiostatsUHNplus
Title: Nested Data Summary and Adverse Events
Version: 0.0.9
Title: Nested Data Summary, Adverse Events and REDCap
Version: 0.0.10
Authors@R: c(
person("Lisa", "Avery", , "lisa.avery@uhn.ca", role = "aut",
comment = c(ORCID = "0000-0002-8431-5143")),
Expand All @@ -17,24 +17,23 @@ Authors@R: c(
person("Jessica", "Weiss", , "jessica.weiss@uhn.ca", role = "aut"),
person("Wei", "Xu", , "wei.xu@uhn.ca", role = "aut")
)
Description: Miscellaneous code snippets and functions with pipes and
multiple package dependencies used for summarizing nested data and
adverse events.
Description: Tools and code snippets for summarizing nested data, adverse events
and REDCap study information.
License: MIT + file LICENSE
Depends: R (>= 4.2)
Imports: afex, coda, cowplot, dplyr, forcats, ggh4x, ggplot2, ggstance,
Imports: afex, coda, cowplot, dplyr, forcats, ggh4x, ggplot2,
lifecycle, MCMCglmm, modeest, openxlsx, plyr, purrr, reportRmd,
rlang, rstatix, stats, stringr, tibble, utils
rlang, rstatix, stats, stringi, stringr, tibble, utils
Suggests: testthat (>= 3.0.0)
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
Collate: 'data.R' 'globals.R' 'as_numeric_parse.R' 'covsum_nested.R'
'dsmb_ccru.R' 'nice_mcmcglmm.R' 'nice_mcmcglmm_icc.R'
'ae_timeline_plot.R' 'caterpillar_plot.R'
'ae_timeline_plot.R' 'caterpillar_plot.R' 'redcap_data_out.R'
NeedsCompilation: no
Packaged: 2023-12-04 14:01:06 UTC; t109810uhn
Packaged: 2024-05-24 15:14:15 UTC; t109810uhn
Author: Lisa Avery [aut] (<https://orcid.org/0000-0002-8431-5143>),
Zeynep Baskurt [aut],
Osvaldo Espin-Garcia [aut],
Expand All @@ -47,4 +46,4 @@ Author: Lisa Avery [aut] (<https://orcid.org/0000-0002-8431-5143>),
Wei Xu [aut]
Maintainer: Tyler Pittman <tyler.pittman@uhn.ca>
Repository: CRAN
Date/Publication: 2023-12-04 14:50:02 UTC
Date/Publication: 2024-05-24 21:10:30 UTC
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2023
YEAR: 2024
COPYRIGHT HOLDER: BiostatsUHNplus authors
74 changes: 38 additions & 36 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
6cd6b67781b0698b3419dc60d4908d40 *DESCRIPTION
c9145a4087a0ab0dcd28fe9888f39ef5 *LICENSE
3f1dc4c711f798f2cc8f724f413667cd *NAMESPACE
45de4f10e14e06ac2aefd47042c8056d *NEWS.md
bb9bfd968c5b85d83916cc2baa2fa520 *R/ae_timeline_plot.R
0e308755410904af5d0d86dea5ed92ab *DESCRIPTION
212e11fbaf01a745d860503be9168093 *LICENSE
b98290490c2794a6eb6ac4390a62ad6b *NAMESPACE
a68b80808d53665d9d3a54f255a764f5 *NEWS.md
17d232eb8f06fe6878f9d677e6deaf31 *R/ae_timeline_plot.R
86b41317ed946b2b1d390b1762920412 *R/as_numeric_parse.R
7d06b986dc72118627b2699036878080 *R/caterpillar_plot.R
35c289ed5911e024a4c7197a07b68f0d *R/caterpillar_plot.R
b55d6c97be4579eba4f3ae43d35feea4 *R/covsum_nested.R
13b8ee6d8b75a3b25750b71f78cfa644 *R/data.R
35bdc9df7238667202b182b72c7265ef *R/dsmb_ccru.R
2991590ff3b2772d654cf21949797928 *R/globals.R
22c38a0d112faf05bb32406a84e7c858 *R/nice_mcmcglmm.R
374cba72503d02c34070410a7b2f21c2 *R/dsmb_ccru.R
12c50395e1335d7141328bd933f704fe *R/globals.R
46b9261d595c6d6ff9a848386c8d7c4b *R/nice_mcmcglmm.R
f79d7119244f71bfa210795d21ed40cc *R/nice_mcmcglmm_icc.R
e008de2c6980dcc79d834ff24c36e654 *README.md
3b4bf359a09f171ed65df05eb549340d *R/redcap_data_out.R
5b8bfd5916c50e739391898293214278 *README.md
5c6516b1c521953d7c429fc23422eeae *data/ae.rda
bdfbacf3e4dcae60b7ce30fa81b1bbc8 *data/demography.rda
fa7e3ff707fb2258a2c61804277a0c27 *data/drug1_admin.rda
Expand All @@ -21,42 +22,43 @@ fa7e3ff707fb2258a2c61804277a0c27 *data/drug1_admin.rda
32fd7e06aee33142ec358542871d204d *man/ae.Rd
d95efe570e3d629af58b06e1da517373 *man/ae_timeline_plot.Rd
ba2dc3c43c7e3cd1ee8fdf20b7fa2c2c *man/as_numeric_parse.Rd
41d11043f34e2b4eea86ea22c5bff61f *man/caterpillar_plot.Rd
c29464ec9ff9420ea68b689edc2cc5a9 *man/caterpillar_plot.Rd
ab1186d88fc5ee3ac5ea206d4bc66ec4 *man/covsum_nested.Rd
d40f7ed9773414272ea5a1cf0e892c84 *man/demography.Rd
285127aafb2a329194df40e91ec78782 *man/drug1_admin.Rd
d42fdf1cf8a78546ce0cd30537c95960 *man/drug2_admin.Rd
59ea80e583c9afab2a9c7b550ee2c539 *man/dsmb_ccru.Rd
94491f0712ab79ab6768ecf192bdcafa *man/dsmb_ccru.Rd
b20eb92ae9bf9204fbc82b2da14d5e68 *man/enrollment.Rd
687a16589bd2ce4a3cdccc2932c4c676 *man/figures/ae_category_attribStart_timeline_plot.png
3bd62bf1a24d4d6f64b1a0a0cc6ef958 *man/figures/ae_category_timeline_plot.png
38f4eae4be46f33fa58b32c78c6803c6 *man/figures/ae_detail_timeline_plot.png
40c22768634ad5d64d4741ead0bf0c34 *man/figures/ana10-1.png
ef041ff3830617b40cf16d73274d5ed9 *man/figures/ae_category_attribStart_timeline_plot.png
4f0c0c841ba597891945b73b07a2791e *man/figures/ae_category_timeline_plot.png
7e4ffc5cf460b9e771719555ecfed904 *man/figures/ae_detail_timeline_plot.png
cd66aa4203ed81bbedbebff65aa00928 *man/figures/ana10-1.png
0090348361ffd009c72ebc448e8ffd92 *man/figures/ana9-1.png
65bd0461b83cb89f56884d9ab34f2f1d *man/figures/caterpillar_plot_Cows_Model.png
990cad58edf75f2e3dd5ed302a8c84db *man/figures/caterpillar_plot_Yards_Model.png
5e3cfe3701f6ade6ceeb32c7c43fd3ef *man/figures/caterpillar_plot_ae_category.png
d3a4df5ae845c5fbc4e928f3480edae9 *man/figures/caterpillar_plot_subject.png
d5ee32da2add4f121ba3895f6cf4e3ac *man/figures/variance_pie_plot.png
f689a0b02a2e59e791499735aa81eb11 *man/figures/caterpillar_plot_Cows_Model.png
cf22f1875b9b387af1457aeb82c61604 *man/figures/caterpillar_plot_Yards_Model.png
e971c093862db7d571dd7edc7185b560 *man/figures/caterpillar_plot_ae_category.png
94e5da14f18e4d39368e889a3b38a0fe *man/figures/caterpillar_plot_subject.png
dad3de27985acabd093819947593c218 *man/figures/variance_pie_plot.png
dcd07d59f07173c61951034bd1aad12c *man/ineligibility.Rd
beb1338f1b6e92e7536316812db1043c *man/nice_mcmcglmm.Rd
8bf413430f58433afdd33a72c18deab2 *man/nice_mcmcglmm_icc.Rd
33685f2a80e14a1ce69fb6dec7421f09 *man/redcap_data_out.Rd
bfd4dd8cf2487c114a2ee55d2d36ca40 *man/rm_covsum_nested.Rd
0f70076d3b7474bf14f0b56879c0462e *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
b9113268a160c3656f6758015eaec558 *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
fb64d3f2dbe95ca0a76dc9f6b3cdaf52 *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
e52a2bdf21e1b1657f76079ae0354d21 *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
33336d32308a534d7042e9db351453d6 *man/tables/ae_detail_EXAMPLE_STUDY__30OCT2020.xlsx
15baf4d47a198ea9d04737af296ebaa4 *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
d9d0b95495e2c8e7ecb1597f3a26ecca *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
6009d0cc8ff66fe77f7d4c0feafc18e2 *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
4950d0f40820160ca0e4573264fcb469 *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
bef81c4b3db25db4061719c16a8d5f63 *man/tables/category_ByEvent_EXAMPLE_STUDY__30OCT2020.xlsx
7b090625b4174ca8f4b842095225007a *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
6d561e0015efac48cec04963ff047e6b *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
a731aab1c7431c3a17fcf5bfca92cbfe *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
fa5c7acef4c3686f139112978c5adfe7 *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
39b202f6aba43474e34f5e3f031d9624 *man/tables/category_BySubject_EXAMPLE_STUDY__30OCT2020.xlsx
9a7813c75b977fbfd3b3b6436333da66 *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
2fb41daf02391bb4ef77c80fedb904ad *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
27f1b4559c6bc4a1a7c144a90bc7a3de *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
697e2802463681ec7b37fdb7523e94d0 *man/tables/ae_detail_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
e66454c3ce2170f826527bef1a07509c *man/tables/ae_detail_EXAMPLE_STUDY__30OCT2020.xlsx
70955d6a8aacbdda683098a003c720df *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
dfed471feb2910fae1a15b6dc32eb3df *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
4cfee83631ba729dbcff336db6c41975 *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
146e7c870322ec710ec358d96f5e1808 *man/tables/category_ByEvent_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
bcb878bb768112554857281f36ab51f8 *man/tables/category_ByEvent_EXAMPLE_STUDY__30OCT2020.xlsx
d48d7fa45a26e969369f2d28a6c2b9af *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_A_30OCT2020.xlsx
f2ee207b6f7f028dca2c03c69175dd38 *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_B_30OCT2020.xlsx
52c05758cdbae9ed0e7108085fb0349f *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_C_30OCT2020.xlsx
8e360521d66ddeb9babf5e865ce3b304 *man/tables/category_BySubject_EXAMPLE_STUDY_Cohort_D_30OCT2020.xlsx
201ef1b39282e87ea64201871a49d7a7 *man/tables/category_BySubject_EXAMPLE_STUDY__30OCT2020.xlsx
623cd226435bb0677c5b6b922e1254d2 *man/tables/output_tab.html
f9c23907950c30f1d2cb0303485d310c *man/tables/output_tab.tex
98e639eda8581152b483cb17691672f7 *tests/testthat.R
Expand Down
13 changes: 12 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(caterpillar_plot)
export(dsmb_ccru)
export(nice_mcmcglmm)
export(nice_mcmcglmm_icc)
export(redcap_data_out)
export(rm_covsum_nested)
import(ggplot2)
import(lifecycle)
Expand All @@ -16,12 +17,17 @@ importFrom(coda,HPDinterval)
importFrom(cowplot,get_legend)
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,any_of)
importFrom(dplyr,arrange)
importFrom(dplyr,coalesce)
importFrom(dplyr,contains)
importFrom(dplyr,count)
importFrom(dplyr,distinct)
importFrom(dplyr,distinct_all)
importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,group_by)
importFrom(dplyr,left_join)
importFrom(dplyr,mutate)
importFrom(dplyr,n)
importFrom(dplyr,n_distinct)
Expand All @@ -30,6 +36,7 @@ importFrom(dplyr,rename)
importFrom(dplyr,right_join)
importFrom(dplyr,row_number)
importFrom(dplyr,select)
importFrom(dplyr,select_if)
importFrom(dplyr,summarise)
importFrom(dplyr,ungroup)
importFrom(forcats,fct_rev)
Expand All @@ -38,7 +45,6 @@ importFrom(ggh4x,elem_list_text)
importFrom(ggh4x,facet_nested)
importFrom(ggh4x,force_panelsizes)
importFrom(ggh4x,strip_nested)
importFrom(ggstance,geom_pointrangeh)
importFrom(modeest,mlv)
importFrom(openxlsx,addStyle)
importFrom(openxlsx,addWorksheet)
Expand All @@ -48,6 +54,7 @@ importFrom(openxlsx,mergeCells)
importFrom(openxlsx,saveWorkbook)
importFrom(openxlsx,setColWidths)
importFrom(openxlsx,setRowHeights)
importFrom(openxlsx,write.xlsx)
importFrom(openxlsx,writeData)
importFrom(parallel,clusterExport)
importFrom(parallel,detectCores)
Expand All @@ -66,8 +73,12 @@ importFrom(stats,lm)
importFrom(stats,median)
importFrom(stats,na.fail)
importFrom(stats,sd)
importFrom(stringi,stri_trans_general)
importFrom(stringr,str_detect)
importFrom(stringr,str_replace)
importFrom(stringr,str_split)
importFrom(stringr,str_trunc)
importFrom(stringr,str_wrap)
importFrom(tibble,rownames_to_column)
importFrom(utils,getFromNamespace)
importFrom(utils,read.csv)
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# BiostatsUHNplus 0.0.10

* Revised redcap_data_out() to do more complex filtering
* Revised caterpillar_plot() axis scale
* Revised nice_mcmcglmm()

# BiostatsUHNplus 0.0.9

* Added functionality to include parametric bootstrapping for nested p-value in summary tables with parallel processing (PSOCK cluster)
Expand Down
7 changes: 4 additions & 3 deletions R/ae_timeline_plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
#' @importFrom ggh4x strip_nested facet_nested elem_list_text elem_list_rect force_panelsizes
#' @importFrom forcats fct_rev
#' @importFrom cowplot get_legend
#' @importFrom ggstance geom_pointrangeh
#' @import ggplot2
#' @import lifecycle
#' @export
Expand Down Expand Up @@ -415,7 +414,8 @@ ae_timeline_plot <- function(subjID,subjID_ineligText=NULL,baseline_datasets,ae_
plotData$group <- as.factor(plotData$group);

p1_with_legend <- ggplot(plotData, aes(xmin=time_min, xmax=time_max, y=forcats::fct_rev(group))) +
ggstance::geom_pointrangeh(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
ggplot2::geom_pointrange(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
#ggstance::geom_pointrangeh(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
geom_text(aes(x=time_max, color=group, label=label), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), size=2.6, hjust=-0.2, show.legend = FALSE, family=fontPlotLabels) +
scale_color_manual(name=NULL, values=c(attribColours1, attribColours2, attribColours3, attribColours4, attribColours5, attribColours6, attribColours7, attribColours8, attribColours9, attribColours10)) +
scale_shape_manual(name=NULL, values=c(attribSymbols1, attribSymbols2, attribSymbols3, attribSymbols4, attribSymbols5, attribSymbols6, attribSymbols7, attribSymbols8, attribSymbols9, attribSymbols10)) +
Expand Down Expand Up @@ -593,7 +593,8 @@ ae_timeline_plot <- function(subjID,subjID_ineligText=NULL,baseline_datasets,ae_
plotData$group <- as.factor(plotData$group);

p1_with_legend <- ggplot(plotData, aes(xmin=time_min, xmax=time_max, y=forcats::fct_rev(group))) +
ggstance::geom_pointrangeh(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
ggplot2::geom_pointrange(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
#ggstance::geom_pointrangeh(aes(x=time_median, shape=group, color=group), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), fatten=2) +
geom_text(aes(x=time_max, color=group, label=label), position=position_dodge2(width = 0, preserve = "single", padding = -1.5), size=2.6, hjust=-0.2, show.legend = FALSE, family=fontPlotLabels) +
scale_color_manual(name=NULL, values=c(attribColours1, attribColours2, attribColours3, attribColours4, attribColours5, attribColours6, attribColours7, attribColours8, attribColours9, attribColours10)) +
scale_shape_manual(name=NULL, values=c(attribSymbols1, attribSymbols2, attribSymbols3, attribSymbols4, attribSymbols5, attribSymbols6, attribSymbols7, attribSymbols8, attribSymbols9, attribSymbols10)) +
Expand Down
Loading

0 comments on commit d89656e

Please sign in to comment.