Skip to content

Commit

Permalink
additions to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
nutterb committed Aug 26, 2016
1 parent 358790e commit b62e4c0
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
@@ -1,6 +1,6 @@
Package: pixiedust
Title: Tables so Beautifully Fine-Tuned You Will Believe It's Magic
Version: 0.7.4
Version: 0.7.5
Authors@R: person("Benjamin", "Nutter", email = "nutter@battelle.org", role = c("aut", "cre"))
Description: The introduction of the broom package has made converting model
objects into data frames as simple as a single function. While the broom
Expand Down
5 changes: 5 additions & 0 deletions NEWS
@@ -1,3 +1,8 @@
### 0.7.5 (26 August 2016)
* Add `pixiemap` for applying differing sprinkles across a `dust_list`
* Add the argument `logical_rows` for dynamically locating rows to sprinkle
* Include a link to the pixiedust webpage for documentation augmentation.

### 0.7.4 (17 June 2016)
* Guard against changes to `options()$scipen` (Issue #62)
* Remove remaining use of `ArgumentCheck` and replace with `checkmate`
Expand Down
10 changes: 10 additions & 0 deletions R/pixieply.R
Expand Up @@ -9,10 +9,20 @@
#' medleys as a method that can work with both \code{dust} and \code{dust_list}
#' objects. \code{pixieply} is a wrapper to \code{lapply} that preserves the
#' \code{dust_list} class of the object.
#'
#' \code{pixiemap} provides functionality to apply differing sprinkles over
#' each element of a \code{dust_list}. The most common example is probably
#' adding a unique caption to each table.
#'
#' @param X An object of class \code{dust_list}.
#' @param FUN A function to apply to each element of \code{X}
#' @param ... Additional arguments to pass to \code{FUN}
#' @param MoreArgs a list of other arguments to FUN
#' @param SIMPLIFY logical or character string; attempt to reduce the result
#' to a vector, matrix or higher dimensional array; see the \code{simplify}
#' argument of \code{\link{sapply}}
#' @param USE.NAMES logical; use names if the first ... argument has names,
#' or if it is a character vector, use that character vector as the names.
#'
#' @examples
#' \dontrun{
Expand Down
15 changes: 12 additions & 3 deletions R/sprinkle.R
Expand Up @@ -70,7 +70,9 @@
#' \tab action \tab Modifies the background color of a cell. \cr
#' \tab default \tab \cr
#' \tab accepts \tab dvips color names; rgb(R,G,B); rgba(R,G,B,A); \cr
#' \tab \tab #RRGGBB; #RRGGBBAA \cr
#' \tab \tab #RRGGBB; #RRGGBBAA. See the "Colors" section \cr
#' \tab \tab for further details or \cr
#' \tab \tab \url{http://nutterb.github.io/pixiedust/colors.html}. \cr
#' \tab console \tab Not recognized \cr
#' \tab markdown \tab Not recognized \cr
#' \tab html \tab Accepts any of the listed formats; \cr
Expand Down Expand Up @@ -136,7 +138,9 @@
#' \tab default \tab "Black" \cr
#' \tab accepts \tab character(1) \cr
#' \tab \tab dvips color names; rgb(R,G,B); rgba(R,G,B,A); \cr
#' \tab \tab #RRGGBB; #RRGGBBAA \cr
#' \tab \tab #RRGGBB; #RRGGBBAA. See the "Colors" section \cr
#' \tab \tab for further details or \cr
#' \tab \tab \url{http://nutterb.github.io/pixiedust/colors.html}. \cr
#' \tab console \tab Not recognized \cr
#' \tab markdown \tab Not recognized \cr
#' \tab html \tab Recognized \cr
Expand Down Expand Up @@ -204,7 +208,9 @@
#' \tab action \tab Sets the color of the cell text \cr
#' \tab default \tab Black \cr
#' \tab accepts \tab dvips color names; rgb(R,G,B); rgba(R,G,B,A); \cr
#' \tab \tab #RRGGBB; #RRGGBBAA \cr
#' \tab \tab #RRGGBB; #RRGGBBAA. See the "Colors" section \cr
#' \tab \tab for further details or \cr
#' \tab \tab \url{http://nutterb.github.io/pixiedust/colors.html}. \cr
#' \tab console \tab Not recognized \cr
#' \tab markdown \tab Not recognized \cr
#' \tab html \tab Recognized; transparency recognized \cr
Expand Down Expand Up @@ -487,6 +493,9 @@
#' All colors are internally translated into rgb format and are case insensitive.
#'
#' @section Required LaTeX Packages:
#' (Read more about \code{pixiedust} with LaTeX at
#' http://nutterb.github.io/pixiedust/latex-configuration.html)
#'
#' If you will be using the LaTeX output, some sprinkles will require you
#' to include additional LaTeX packages in your document preamble. In
#' \code{.Rnw} files, additional packages can be included with the
Expand Down
6 changes: 6 additions & 0 deletions R/zzz.R
@@ -1,3 +1,9 @@
.onAttach <- function(libname,pkgname)
{
packageStartupMessage("Additional documentation is being constructed at ",
"http://nutterb.github.io/pixiedust/index.html")
}

.onLoad <- function(libname,pkgname)
{
options(pixiedust_print_method = "console",
Expand Down
13 changes: 13 additions & 0 deletions man/pixieply.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 12 additions & 3 deletions man/sprinkle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-pixieply.R
Expand Up @@ -17,7 +17,7 @@ test_that(
"apply unique captions to dust_list",
{
mtcars %>%
group_by(gear) %>%
dplyr::group_by(gear) %>%
dust(ungroup = FALSE) %>%
pixiemap(FUN = sprinkle,
caption = sprintf("gear = %s", sort(unique(mtcars$gear)))) %>%
Expand Down

0 comments on commit b62e4c0

Please sign in to comment.