Skip to content

Commit

Permalink
Merge pull request #50 from gforge/develop
Browse files Browse the repository at this point in the history
Updates for 3.0.0
  • Loading branch information
gforge authored Sep 28, 2022
2 parents 2383db1 + eff28a3 commit 4f15651
Show file tree
Hide file tree
Showing 77 changed files with 3,573 additions and 2,303 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ cran-comments.md
^doc$
^Meta$
^cran-comments\.md$
^CRAN-SUBMISSION$
18 changes: 10 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: forestplot
Version: 2.0.2
Version: 3.0.0
Title: Advanced Forest Plot Using 'grid' Graphics
Authors@R: c(person(given = "Max",
family = "Gordon",
Expand All @@ -23,19 +23,21 @@ Biarch: yes
Depends:
R (>= 3.5.0),
grid,
magrittr,
checkmate
checkmate,
abind
Suggests:
testthat,
abind,
dplyr,
knitr,
purrr,
rmarkdown,
rmeta,
dplyr,
testthat,
tibble,
tidyr,
tidyselect,
rlang
Encoding: UTF-8
NeedsCompilation: no
VignetteBuilder: knitr
Roxygen: list()
RoxygenNote: 7.1.1
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.1
15 changes: 14 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,23 @@ export(fpDrawSummaryCI)
export(fpLegend)
export(fpShapesGp)
export(fpTxtGp)
export(fp_add_header)
export(fp_align_center)
export(fp_align_left)
export(fp_align_right)
export(fp_append_row)
export(fp_decorate_graph)
export(fp_insert_row)
export(fp_set_style)
export(fp_set_zebra_style)
export(fp_txt_bold)
export(fp_txt_gp)
export(fp_txt_italic)
export(fp_txt_plain)
export(getTicks)
export(prGetShapeGp)
import(grid)
import(magrittr)
importFrom(abind,adrop)
importFrom(checkmate,assert)
importFrom(checkmate,assert_class)
importFrom(checkmate,assert_matrix)
Expand Down
19 changes: 18 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
NEWS for the forestplot package

Changes for 2.0.2
Changes for 3.0.0
-----------------
* The `forestplot()` now returns an object with raw data that can be manipulated
by subsequent functions prior to plotting. All visual output is now generated
during the actual generation of the graph - this allows saving the plot and
plotting it when explicitly requested. BREAKING - this may be a breaking
feature although most of the old syntax should work without much need for
adaptation.
* New additive syntax with:
* Row manipulation: `fp_insert_row`, `fp_add_header`, and `fp_append_row`
* Style functions: `fp_set_style`, `fp_set_zebra_style`, and `fp_decorate_graph`
* Text styling: `fp_txt_bold`, `fp_txt_italic`, ...
* Align functions: `fp_align_left`, `fp_align_center`, `fp_align_right`
* Fixed bug with how grouped data frames are processed and presented.
* Expressions are now allowed in data.frame tidyverse input.
* Moved to native R-pipe operator (|> instead of %>%)
* Fixed case when all rows are summaries (Thanks Christian Röver)
* Fixed automated ticks.
* Fixed bug calculating graph width
* Added graph decoration (fixes issue #11)

Changes for 2.0.1
-----------------
Expand Down
4 changes: 2 additions & 2 deletions R/assertAndRetrieveTidyValue.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ assertAndRetrieveTidyValue <- function(x,
stop(
"You have not provided an argument",
" and the data frame does not have a '", name, "' column: ",
names(x) %>% paste(collapse = ", ")
names(x) |> paste(collapse = ", ")
)
}
return(structure(value, tidyFormat = TRUE))
Expand All @@ -33,7 +33,7 @@ assertAndRetrieveTidyValue <- function(x,
# We are one-caller removed from the original call so we need to
# do this nasty hack to get the parameter of the parent function
orgName <- eval(substitute(substitute(value)), envir = parent.frame())
tryCatch(dplyr::select(x, {{ orgName }}) %>% structure(tidyFormat = TRUE),
tryCatch(dplyr::select(x, {{ orgName }}) |> structure(tidyFormat = TRUE),
error = function(e) {
return(structure(value,
tidyFormat = FALSE
Expand Down
Loading

0 comments on commit 4f15651

Please sign in to comment.