Skip to content

Commit

Permalink
Preparing for CRAN submission
Browse files Browse the repository at this point in the history
- Remove grid version to address binary build failure on OSX
- Remove unused strip.position parameter from facet_wrap
- Update version numbers, README, NEWS
  • Loading branch information
stefan-schroedl committed Nov 13, 2016
1 parent 1c617e5 commit bd850b1
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 21 deletions.
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: plotluck
Title: 'ggplot2' Version of "I'm Feeling Lucky!"
Version: 1.0.0.9000
Version: 1.1.0
Authors@R: person("Stefan", "Schroedl", , "[email protected]", c("aut", "cre"))
Description: Examines the characteristics of a data frame and a formula to
automatically choose the most suitable type of plot out of the following supported
Expand All @@ -11,16 +11,16 @@ Description: Examines the characteristics of a data frame and a formula to
factor levels, and overlaying smoothing curves and median lines. Plots are
drawn using 'ggplot2'.
Depends:
R (>= 3.3.1)
R (>= 3.1)
Imports:
ggplot2 (>= 2.1.0),
grid,
Hmisc (>= 3.17.4),
quantreg (>= 5.26),
scales (>= 0.4.0),
scales (>= 0.4.1),
plyr (>= 1.8.4),
grid (>= 3.3.1),
hexbin (>= 1.27.1),
RColorBrewer (>= 1.1.2)
RColorBrewer (>= 1.1.2),
ggplot2 (>= 2.2.0)
License: MIT + file LICENSE
URL: https://github.com/stefan-schroedl/plotluck
BugReports: https://github.com/stefan-schroedl/plotluck/issues
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# plotluck 1.0.0
# plotluck 1.1.0
* Compatibility with ggplot 2.2.0
* Swap order of data and formula arguments, as requested

# plotluck 1.0.0 (2016-09-22)
* First CRAN release
* Compatibility with ggplot 2.1.0
* Changed _plotluck()_ arguments to use a formula instead of arguments _x,y,z_
* Removed _plotluck.multi()_ from being public - functionality can now be accessed using dot symbol _'.'_ in plotluck formula
Expand Down
6 changes: 2 additions & 4 deletions R/plotluck.R
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ discretize.few.unique <- function(data, x, few.unique.as.factor=5, verbose=FALSE
return(data)
}
non.na <- !is.na(data[[x]])
# works for both data frames and tibbles
u <- nrow(unique(data[non.na,x,drop=FALSE]))

if (u <= few.unique.as.factor &&
Expand Down Expand Up @@ -2722,22 +2723,19 @@ format.facets <- function(data, x, show.var='first') {
add.facet.wrap <- function(p, data, cond, preferred.order, opts) {
nrow <- NULL
ncol <- NULL
strip.position <- NULL
show.var <- 'first'
if (preferred.order == 'row') {
ncol <- opts$facet.max.cols
strip.position <- 'bottom'
} else if (preferred.order == 'col') {
nrow <- opts$facet.max.rows
strip.position <- 'left'
show.var <- 'last'
}
facet.labels <- format.facets(data, cond, show.var)

p <- p + theme_slanted_text_x + # axis text might overlap in small diagrams
facet_wrap(cond,
labeller=as_labeller(facet.labels),
nrow=nrow, ncol=ncol, strip.position=strip.position) +
nrow=nrow, ncol=ncol) +
theme(panel.border=element_rect(fill=NA))
# known issue 1: always slanting text is not ideal, but no quick fix
# known issue 2: for it would be good to order vertical facets like axis
Expand Down
Binary file modified README-unnamed-chunk-2-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Imagine you have given a new R data frame, and would like to get an overview of

```{r, fig.show='hold'}
library(plotluck)
data(diamonds,package='ggplot2')
plotluck(price~cut+color, diamonds)
data(diamonds, package='ggplot2')
plotluck(diamonds, price~cut+color)
```

## Features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Imagine you have given a new R data frame, and would like to get an overview of

```r
library(plotluck)
data(diamonds,package='ggplot2')
plotluck(price~cut+color, diamonds)
data(diamonds, package='ggplot2')
plotluck(diamonds, price~cut+color)
```

![plot of chunk unnamed-chunk-2](README-unnamed-chunk-2-1.png)
Expand Down
26 changes: 20 additions & 6 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
## Resubmission
This is a resubmission. In this version I have reformulated the DESCRIPTION
according to the feedback (first sentence in active case, moved reference to ggplot2
to the end).

Reduced size of tar.gz from 11M to 370K, as requested.

## Test environments
* local OS X install, R 3.3.1
* win-builder (devel and release)

## R CMD check results
There were no ERRORs or WARNINGs.
There were no ERRORs or WARNINGs, and 3 NOTES:

- License components with restrictions and base license permitting such:
MIT + file LICENSE
File 'LICENSE':
YEAR: 2014
COPYRIGHT HOLDER: Stefan Schroedl

- running examples for arch 'i386' ... [19s]
Examples with CPU or elapsed time > 10s
user system elapsed
plotluck 15.29 0.19 15.66
- running examples for arch 'x64' ... [26s]
Examples with CPU or elapsed time > 10s
user system elapsed
plotluck 20.95 0.25 21.32

There was 1 NOTE:
New submission
I have not changed the examples from last submission, and I don't get these
notes locally. I am assuming the win-builder server is busy.

0 comments on commit bd850b1

Please sign in to comment.