Skip to content

Commit

Permalink
version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jonocarroll authored and cran-robot committed Aug 7, 2016
0 parents commit 03565f0
Show file tree
Hide file tree
Showing 38 changed files with 1,134 additions and 0 deletions.
18 changes: 18 additions & 0 deletions DESCRIPTION
@@ -0,0 +1,18 @@
Package: ggghost
Title: Capture the Spirit of Your 'ggplot2' Calls
Version: 0.1.0
Authors@R: person("Jonathan", "Carroll", email = "rpkg@jcarroll.com.au", role = c("aut", "cre"))
Maintainer: Jonathan Carroll <rpkg@jcarroll.com.au>
Description: Creates a reproducible 'ggplot2' object by storing the data and calls.
Depends: R (>= 3.2.0), ggplot2, animation
License: GPL (>= 3)
Encoding: UTF-8
LazyData: true
BugReports: https://github.com/jonocarroll/ggghost/issues
RoxygenNote: 5.0.1
Suggests: testthat
NeedsCompilation: no
Packaged: 2016-08-07 14:25:04 UTC; jono
Author: Jonathan Carroll [aut, cre]
Repository: CRAN
Date/Publication: 2016-08-07 17:50:52
37 changes: 37 additions & 0 deletions MD5
@@ -0,0 +1,37 @@
c07e6d082fa8a0f271d741c5eb3ab8d1 *DESCRIPTION
6d03c7317b69c9d293174ec167c99145 *NAMESPACE
e8646a96cd7dcfd0e5baeaed9fdceaf1 *R/ggghost-package.R
a1fe1e76c25c964aef5013d96c5c7a3c *R/ghost.R
40d14222d446ab20a5620b79ed7ff547 *R/zzz.R
059876a91c8ff8ea192474d9a4aa0fca *README.md
29d1109111a3f8c36cd087761afd37ea *inst/extdata/mycoolplot.rds
e0a86d7a4858159979fe4c0da4420768 *inst/img/README-unnamed-chunk-10-1.png
76564fcceddd7fb98d0f97b8b1820629 *inst/img/README-unnamed-chunk-11-1.png
4607fe647d92c5a77bdef9228c1dd2bf *inst/img/README-unnamed-chunk-11-2.png
da9d6ad80267a564300032aa7a74729f *inst/img/README-unnamed-chunk-12-1.png
84d8ade83f3220349ca69ab9c5c49118 *inst/img/README-unnamed-chunk-14-1.png
e0a86d7a4858159979fe4c0da4420768 *inst/img/README-unnamed-chunk-15-1.png
13486f734be6b4eb8875b63617a934da *inst/img/README-unnamed-chunk-6-1.png
e0a86d7a4858159979fe4c0da4420768 *inst/img/README-unnamed-chunk-7-1.png
443a8d7864b737f94120f7f6466360ba *inst/img/README-unnamed-chunk-8-1.png
dd2f3b2a78ad281a4cb2248e35735a40 *inst/img/README-unnamed-chunk-9-1.png
57fe1c9a00913b4b733a7c2ae57ec111 *inst/img/mycoolplot.gif
fb353d949bf0015bcb12d414821e6e27 *inst/img/scooby.gif
9d7bf5298fd28ce7ea0a13da90c4046f *man/ggghost.Rd
95d3340c615564dc19d6dac87ae46e5b *man/grapes-g-less-than-grapes.Rd
2b2085b0af872d19d3366104b142be94 *man/identify_data.Rd
d0197cf8f8fbd2fe0b1a7154439e7902 *man/is.ggghost.Rd
1d56f991b62d62da89c451683763ffc3 *man/minus-ggghost.Rd
78ef9029fefd8bfc3c2b989523f4b854 *man/plus-ggghost.Rd
64095fb6dae3066b9de54503ba2b2128 *man/print.ggghost.Rd
ca77826fc30d109f2197d0cd6c0311fa *man/reanimate.Rd
61f93b9b70e1f3e2d0daf99a8437f2b9 *man/recover_data.Rd
398ae7e329bb745d651780193d8efeab *man/subset.ggghost.Rd
06a65cd5e10d4bd77f8c544097edde02 *man/summary.ggghost.Rd
742313eae0e4ab92e9aa0d95a323e748 *tests/testthat.R
e6db896fd22c82919be9e330599ba70d *tests/testthat/Rplots.pdf
2ebbc6603300e90abc74a01ffb4fd86f *tests/testthat/test_Ops.R
4d6272cbb733a1bf05c457f60dfa0a07 *tests/testthat/test_construct.R
40a4ca91459340ff5c8435cd7f2eb02e *tests/testthat/test_data.R
fb89ec3cd3ea847c29d89d8cb1264426 *tests/testthat/test_gif.R
7d281c5f8c8cca4149f410dcc4f309df *tests/testthat/test_methods.R
17 changes: 17 additions & 0 deletions NAMESPACE
@@ -0,0 +1,17 @@
# Generated by roxygen2: do not edit by hand

S3method("+",gg)
S3method("-",gg)
S3method(print,ggghost)
S3method(subset,ggghost)
S3method(summary,ggghost)
export("%g<%")
export(is.ggghost)
export(lazarus)
export(reanimate)
export(recover_data)
importFrom(animation,ani.options)
importFrom(animation,saveGIF)
importFrom(ggplot2,"%+%")
importFrom(ggplot2,is.ggplot)
importFrom(ggplot2,is.theme)
24 changes: 24 additions & 0 deletions R/ggghost-package.R
@@ -0,0 +1,24 @@
#' ggghost: Capture the spirit of your ggplot calls
#'
#' Creates a reproducible container for ggplot, storing the data and calls required to produce a plot.
#'
#' `ggplot` stores the information needed to build the graph as a `grob`, but
#' that's what the **computer** needs to know about in order to build the graph.
#' As humans, we're more interested in what commands were issued in order to
#' build the graph. For good reproducibility, the calls need to be applied to the
#' relevant data. While this is somewhat available by deconstructing the `grob`,
#' it's not the simplest approach.
#'
#' Here is one option that solves that problem.
#'
#' `ggghost` stores the data used in a `ggplot()` call, and collects `ggplot`
#' commands (usually separated by `+`) as they are applied, in effect lazily
#' collecting the calls. Once the object is requested, the `print` method
#' combines the individual calls back into the total plotting command and
#' executes it. This is where the call would usually be discarded. Instead, a
#' "ghost" of the commands lingers in the object for further investigation,
#' subsetting, adding to, or subtracting from.
#'
#' @docType package
#' @name ggghost
NULL

0 comments on commit 03565f0

Please sign in to comment.