Skip to content

Commit

Permalink
Merge pull request #50 from gforge/develop
Browse files Browse the repository at this point in the history
Version 1.11.0
  • Loading branch information
gforge authored Jul 3, 2020
2 parents 6f3c1c1 + 58a4d58 commit 79ff158
Show file tree
Hide file tree
Showing 122 changed files with 8,553 additions and 5,215 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^visual_tests
^\.travis\.yml$
^cran-comments\.md$
.vscode
Gmisc/inst/extdata/Full_test_suite_files/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ tests/testthat/*.pdf
cran-comments.md
vignettes/*.R
vignettes/*.html
inst/extdata/*.html
inst/extdata/*.css
inst/extdata/Full_test_suite_files/*
4 changes: 2 additions & 2 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This package was submitted to CRAN on 2019-12-07.
Once it is accepted, delete this file and tag the release (commit acba2f17f2).
This package was submitted to CRAN on 2020-05-06.
Once it is accepted, delete this file and tag the release (commit bed562e745).
16 changes: 8 additions & 8 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Package: Gmisc
Version: 1.10.0
Date: 2020-05-05
Version: 1.11.0
Date: 2020-06-30
Title: Descriptive Statistics, Transition Plots, and More
Author: Max Gordon <[email protected]>
Maintainer: Max Gordon <[email protected]>
Description: Tools for making the descriptive "Table 1" used in medical
articles, a transition plot for showing changes between categories
(also known as a Sankey diagram), flow charts by extending the grid package,
a method for variable selection based on the SVD, Bézier lines with arrows complementing the
ones in the 'grid' package, and more.
articles, a transition plot for showing changes between categories
(also known as a Sankey diagram), flow charts by extending the grid package,
a method for variable selection based on the SVD, Bézier lines with arrows
complementing the ones in the 'grid' package, and more.
License: GPL (>= 3)
URL: http://gforge.se
BugReports: https://github.com/gforge/Gmisc/issues
Biarch: yes
Depends:
R (>= 3.2.0),
Rcpp (>= 0.11.4),
htmlTable (>= 1.13)
htmlTable (>= 2.0.0)
Imports:
abind,
checkmate,
Expand Down Expand Up @@ -44,4 +44,4 @@ Encoding: UTF-8
NeedsCompilation: no
VignetteBuilder: knitr
LinkingTo: Rcpp
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
10 changes: 10 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ S3method(knit_print,descMrg)
S3method(latex,descMrg)
S3method(plot,box)
S3method(plot,connect_boxes)
S3method(print,Gmisc_list_of_boxes)
S3method(print,Gmisc_unit)
S3method(print,box)
S3method(print,connect_boxes)
S3method(print,descMrg)
S3method(widthDetails,box)
export(alignHorizontal)
export(alignVertical)
export(bezierArrowGradient)
export(bezierArrowSmpl)
export(boxGrob)
Expand Down Expand Up @@ -42,8 +46,11 @@ export(has)
export(insertRowAndKeepAttr)
export(mergeDesc)
export(mergeLists)
export(moveBox)
export(pathJoin)
export(retrieve)
export(spreadHorizontal)
export(spreadVertical)
export(time2spanTxt)
export(transitionPlot)
export(yamlDump)
Expand All @@ -65,14 +72,17 @@ importFrom(checkmate,assert)
importFrom(checkmate,assert_class)
importFrom(checkmate,assert_list)
importFrom(checkmate,assert_number)
importFrom(checkmate,checkCharacter)
importFrom(checkmate,checkClass)
importFrom(checkmate,checkNumeric)
importFrom(checkmate,checkString)
importFrom(checkmate,checkTRUE)
importFrom(glue,glue)
importFrom(grDevices,as.raster)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,grey)
importFrom(graphics,par)
importFrom(grid,is.unit)
importFrom(knitr,asis_output)
importFrom(knitr,knit_print)
importFrom(lubridate,as_date)
Expand Down
12 changes: 12 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
NEWS for the Gmisc package

Changes for 1.11.0
------------------
* Fix for adjustment in box justification, thanks Carl Suster
* Fix for incorrect boxPropGrob height calculation, bad handling of missing arguments and ignored gpar arguments (issue #46)
* Slightly changed color scheme for boxGrobs
* Added moveBox for moving boxGrob objects
* Added alignVertical and alignHorizontal for aligning boxGrob objects
* Added spreadVertival and spreadHorizontal for spreading boxGrob objects over the viewport
* Styling of htmlTable removed due to the 2.0 api change, nbow. the css.rgroup should be set using set htmlTable::setHtmlTableTheme
or by passing the output thorugh htmlTable::addHtmlTableStyle.
* The boxes now accept language input, thanks Carl Suster

Changes for 1.10.0
------------------
* Added yamlDump for quick object review
Expand Down
4 changes: 2 additions & 2 deletions R/Gmisc.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#' The \code{\link{mergeDesc}} allows you to merge a set of outputs \code{\link{getDescriptionStatsBy}}
#' into a \code{\link[htmlTable]{htmlTable}} with the rgroup arguments automatically
#' generated, see \code{vignette("descriptives", package="Gmisc")} for a
#' generated, see \code{vignette("descriptives", package = "Gmisc")} for a
#' detailed workflow description.
#'
#' @section Some fancy plots:
Expand All @@ -40,4 +40,4 @@
#'
#' @name Gmisc-package
#' @docType package
NULL
NULL
29 changes: 16 additions & 13 deletions R/assert.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
#' @return void
#' @rdname assert
#' @keywords internal
#' @importFrom checkmate checkClass checkNumeric assert
assert_unit <- function(var, allow_missing = TRUE){
if (missing(var) && allow_missing)
#' @importFrom checkmate assert checkClass checkNumeric
assert_unit <- function(var, allow_missing = TRUE) {
if (missing(var) && allow_missing) {
return()
}

assert(
checkClass(var, "unit"),
Expand All @@ -26,10 +27,11 @@ assert_unit <- function(var, allow_missing = TRUE){
#' @return void
#' @rdname assert
#' @keywords internal
#' @importFrom checkmate checkString checkNumeric assert
assert_label <- function(var, allow_missing = TRUE){
if (missing(var) && allow_missing)
#' @importFrom checkmate assert checkString checkNumeric
assert_label <- function(var, allow_missing = TRUE) {
if (missing(var) && allow_missing) {
return()
}

assert(
checkString(var),
Expand All @@ -40,16 +42,17 @@ assert_label <- function(var, allow_missing = TRUE){

#' Assert valid color
#'
#' @param var Varible 2 check
#' @param var Variable 2 check
#' @param allow_missing Allow missing variables
#'
#' @return void
#' @rdname assert
#' @keywords internal
#' @importFrom checkmate checkString assert
assert_just <- function(var, allow_missing = TRUE){
if (missing(var) && allow_missing)
#' @importFrom checkmate assert checkCharacter checkNumeric
assert_just <- function(var, allow_missing = TRUE) {
if (missing(var) && allow_missing) {
return()
}

assert(
checkCharacter(var, pattern = "^left|right|top|bottom|center|centre$", max.len = 2),
Expand All @@ -62,6 +65,6 @@ dep_var <- function(x) {
nn <- substitute(x)
on <- do.call("substitute", list(as.name(nn), parent.frame(1)))
paste0(deparse(deparse(on), width.cutoff = 500),
collapse = "\n")
}

collapse = "\n"
)
}
Loading

0 comments on commit 79ff158

Please sign in to comment.