Skip to content

Commit

Permalink
release on CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasp85 committed Aug 21, 2019
1 parent 9a16e0e commit b408ce8
Show file tree
Hide file tree
Showing 7 changed files with 119 additions and 53 deletions.
44 changes: 44 additions & 0 deletions R/bezier.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,28 @@ NULL
#' @usage NULL
#' @export
StatBezier <- ggproto('StatBezier', Stat,
# .Deprecated - remove after next release
compute_layer = function(self, data, params, layout) {
if (is.null(data)) return(data)
data <- remove_missing(data, params$na.rm,
c(self$required_aes, self$non_missing_aes),
snake_class(self),
finite = TRUE
)

# Trim off extra parameters
params <- params[intersect(names(params), self$parameters())]

args <- c(list(data = quote(data), scales = quote(scales)), params)
dapply(data, "PANEL", function(data) {
scales <- layout$get_scales(data$PANEL[1])
tryCatch(do.call(self$compute_panel, args), error = function(e) {
warning("Computation failed in `", snake_class(self), "()`:\n",
e$message, call. = FALSE)
new_data_frame()
})
})
},
compute_panel = function(data, scales, n = 100) {
if (is.null(data)) return(data)
nControls <- table(data$group)
Expand Down Expand Up @@ -218,6 +240,28 @@ geom_bezier2 <- function(mapping = NULL, data = NULL, stat = 'bezier2',
#' @usage NULL
#' @export
StatBezier0 <- ggproto('StatBezier0', Stat,
# .Deprecated - remove after next release
compute_layer = function(self, data, params, layout) {
if (is.null(data)) return(data)
data <- remove_missing(data, params$na.rm,
c(self$required_aes, self$non_missing_aes),
snake_class(self),
finite = TRUE
)

# Trim off extra parameters
params <- params[intersect(names(params), self$parameters())]

args <- c(list(data = quote(data), scales = quote(scales)), params)
dapply(data, "PANEL", function(data) {
scales <- layout$get_scales(data$PANEL[1])
tryCatch(do.call(self$compute_panel, args), error = function(e) {
warning("Computation failed in `", snake_class(self), "()`:\n",
e$message, call. = FALSE)
new_data_frame()
})
})
},
compute_panel = function(data, scales) {
if (is.null(data)) return(data)
data <- data[order(data$group), ]
Expand Down
22 changes: 22 additions & 0 deletions R/link.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ NULL
#' @usage NULL
#' @export
StatLink <- ggproto('StatLink', Stat,
# .Deprecated - remove after next release
compute_layer = function(self, data, params, layout) {
if (is.null(data)) return(data)
data <- remove_missing(data, params$na.rm,
c(self$required_aes, self$non_missing_aes),
snake_class(self),
finite = TRUE
)

# Trim off extra parameters
params <- params[intersect(names(params), self$parameters())]

args <- c(list(data = quote(data), scales = quote(scales)), params)
dapply(data, "PANEL", function(data) {
scales <- layout$get_scales(data$PANEL[1])
tryCatch(do.call(self$compute_panel, args), error = function(e) {
warning("Computation failed in `", snake_class(self), "()`:\n",
e$message, call. = FALSE)
new_data_frame()
})
})
},
compute_panel = function(data, scales, n = 100) {
extraCols <- !names(data) %in% c('x', 'y', 'xend', 'yend', 'group', 'PANEL')
data$group <- make.unique(as.character(data$group))
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ devtools::install_github("thomasp85/ggforce")
## Features
`ggforce` is by design a collection of features with the only commonality being
their tie to the `ggplot2` API. Because of this an overview of all features
would get too long for a README. The package does contain a
[vignette](https://CRAN.R-project.org/package=ggforce/vignettes/Visual_Guide.html)
would get too long for a README. The package has a [website](https://ggforce.data-imaginist.com)
where every feature is described and justified with examples and plots. There
should be a plot in the README of a visualization package though, so without
further ado:
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ devtools::install_github("thomasp85/ggforce")
`ggforce` is by design a collection of features with the only
commonality being their tie to the `ggplot2` API. Because of this an
overview of all features would get too long for a README. The package
does contain a
[vignette](https://CRAN.R-project.org/package=ggforce/vignettes/Visual_Guide.html)
where every feature is described and justified with examples and plots.
There should be a plot in the README of a visualization package though,
so without further ado:
has a [website](https://ggforce.data-imaginist.com) where every feature
is described and justified with examples and plots. There should be a
plot in the README of a visualization package though, so without further
ado:

``` r
library(ggforce)
Expand Down
3 changes: 3 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Fix for reverse dependencies that showed in latest submission. All reverse
dependencies have been checked again and show no problems

## Test environments
* local OS X install, R 3.6.0
* ubuntu 14.04 (on travis-ci), R 3.6.0
Expand Down
13 changes: 6 additions & 7 deletions revdep/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |Europe/Copenhagen |
|date |2019-08-09 |
|date |2019-08-20 |

# Dependencies

|package |old |new |Δ |
|:-------|:-----|:----------|:--|
|ggforce |0.2.2 |0.2.2.9000 |* |
|digest |NA |0.6.20 |* |
|pillar |NA |1.4.2 |* |
|Rcpp |NA |1.0.2 |* |
|package |old |new |Δ |
|:-------|:-----|:------|:--|
|ggforce |0.3.0 |0.3.1 |* |
|digest |NA |0.6.20 |* |
|pillar |NA |1.4.2 |* |

# Revdeps

Expand Down
Loading

0 comments on commit b408ce8

Please sign in to comment.