Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
^vignettes/articles$
^\.gitlab-ci\.yml$
LICENSE
.lintr
6 changes: 6 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
linters: linters_with_defaults(
line_length_linter = line_length_linter(120),
cyclocomp_linter = NULL,
object_usage_linter = NULL,
object_length_linter = NULL
)
9 changes: 7 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: crane
Title: Supplements the 'gtsummary' Package for Pharmaceutical Reporting
Version: 0.2.0.9014
Version: 0.2.0.9015
Authors@R: c(
person("Daniel D.", "Sjoberg", , "danield.sjoberg@gmail.com", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-0862-2018")),
Expand All @@ -22,15 +22,20 @@ BugReports: https://github.com/insightsengineering/crane/issues
Depends:
gtsummary (>= 2.4.0.9009),
R (>= 4.2)
Imports:
Imports:
assertthat (>= 0.2.1),
broom (>= 1.0.8),
cards (>= 0.7.0),
cardx (>= 0.3.0),
cowplot (>= 1.2.0),
checkmate (>= 2.3.2),
cli (>= 3.6.4),
dplyr (>= 1.1.4),
flextable (>= 0.9.7),
ggplot2 (>= 4.0.0),
glue (>= 1.8.0),
gt (>= 0.11.1),
labeling,
lifecycle,
rlang (>= 1.1.5),
survival (>= 3.6-4),
Expand Down
45 changes: 45 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ export("%>%")
export(add_blank_rows)
export(add_hierarchical_count_row)
export(add_overall)
export(annot_at_risk)
export(annot_cox_ph)
export(annot_surv_med)
export(filter_hierarchical)
export(g_km)
export(get_cox_pairwise_tbl)
export(h_data_plot)
export(label_roche_number)
export(label_roche_percent)
export(label_roche_pvalue)
Expand All @@ -36,6 +42,11 @@ export(tbl_survfit_times)
export(theme_gtsummary_roche)
import(glue)
import(rlang)
importFrom(assertthat,assert_that)
importFrom(broom,tidy)
importFrom(cowplot,draw_plot)
importFrom(cowplot,ggdraw)
importFrom(cowplot,plot_grid)
importFrom(dplyr,"%>%")
importFrom(dplyr,across)
importFrom(dplyr,all_of)
Expand All @@ -48,6 +59,40 @@ importFrom(dplyr,matches)
importFrom(dplyr,num_range)
importFrom(dplyr,starts_with)
importFrom(dplyr,where)
importFrom(ggplot2,.pt)
importFrom(ggplot2,aes)
importFrom(ggplot2,annotate)
importFrom(ggplot2,coord_cartesian)
importFrom(ggplot2,element_blank)
importFrom(ggplot2,element_line)
importFrom(ggplot2,element_rect)
importFrom(ggplot2,element_text)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_ribbon)
importFrom(ggplot2,geom_step)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,guide_legend)
importFrom(ggplot2,guides)
importFrom(ggplot2,labs)
importFrom(ggplot2,margin)
importFrom(ggplot2,scale_color_manual)
importFrom(ggplot2,scale_fill_manual)
importFrom(ggplot2,scale_linetype_manual)
importFrom(ggplot2,scale_shape_manual)
importFrom(ggplot2,scale_x_continuous)
importFrom(ggplot2,scale_y_continuous)
importFrom(ggplot2,theme)
importFrom(ggplot2,theme_bw)
importFrom(ggplot2,theme_void)
importFrom(gtsummary,add_overall)
importFrom(gtsummary,filter_hierarchical)
importFrom(gtsummary,sort_hierarchical)
importFrom(labeling,extended)
importFrom(rlang,.data)
importFrom(rlang,ensym)
importFrom(stats,pchisq)
importFrom(survival,Surv)
importFrom(survival,coxph)
importFrom(survival,survdiff)
importFrom(tidyr,pivot_wider)
importFrom(utils,tail)
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# crane 0.2.0.9014
# crane 0.2.0.9015

* Added `g_km()` function for creating Kaplan-Meier plots.

* Added `list("assign_summary_type-arg:cat_threshold" = 0L)` to `theme_gtsummary_roche()`. Numeric variables with few levels will no longer default to summary type `'categorical'` in `gtsummary::tbl_summary()` and `tbl_roche_summary()`. (#79)

Expand Down
3 changes: 2 additions & 1 deletion R/crane-package.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' @keywords internal
#' @import rlang
#' @import glue glue
#' @importFrom utils tail
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would import ggplot2 here

#' @importFrom dplyr across starts_with ends_with contains matches num_range
#' all_of any_of everything last_col where
"_PACKAGE"
Expand All @@ -9,7 +10,7 @@
## usethis namespace: end
NULL

utils::globalVariables(c("."))
utils::globalVariables(c(".", "obj"))

# using pkgs to silence NOTE
.silence <- function() {
Expand Down
Loading
Loading