Skip to content

Commit

Permalink
Fixed Roxygen package documentation issue with _PACKAGE sentinel
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Moravec committed Aug 25, 2023
1 parent 54c2cfd commit ed400d8
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: baffle
Title: Make Waffle Plots with Base Graphics
Version: 0.2.1
Version: 0.2.2
Authors@R:
person(given = "Jiří",
family = "Moravec",
Expand All @@ -15,7 +15,7 @@ Description: Waffle plots are rectangular pie charts that represent a quantity o
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Imports:
grDevices
Expand Down
4 changes: 2 additions & 2 deletions R/baffle.r
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
#' proportional ratios.
#'
#' @docType package
#' @name baffle
NULL
#' @keywords internal
"_PACKAGE"
17 changes: 16 additions & 1 deletion man/baffle.Rd → man/baffle-package.Rd

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

6 changes: 3 additions & 3 deletions vignettes/baffle.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ waffle(cyl, stacked=FALSE, gap=1)
legend("top", horiz=TRUE, bty="n", inset=0.9, xpd=TRUE,
legend=names(cyl), cex=2,
fill=palette.colors(length(cyl), "Set 1"), border=NA,
title="Number of cylinders\n in 'mtcars'", title.font=2, title.cex=1.5)
title="Number of cylinders\n in 'mtcars'")
```

## Squares, Circles, Polygons
Expand All @@ -117,7 +117,7 @@ waffle(cyl, stacked=FALSE, gap=1, f=rcpoly, n=as.numeric(names(cyl)))
legend("top", horiz=TRUE, bty="n", inset=0.9, xpd=TRUE,
legend=names(cyl), cex=2,
fill=palette.colors(length(cyl), "Set 1"), border=NA,
title="Number of cylinders\n in 'mtcars'", title.font=2, title.cex=1.5)
title="Number of cylinders\n in 'mtcars'")
```

Shame that the `legend` does not allow for such flexibility!
Expand Down Expand Up @@ -146,7 +146,7 @@ waffle(cyl, stacked=FALSE, gap=1, f=autotext, labels=names(cyl))
legend("top", horiz=TRUE, bty="n", inset=0.9, xpd=TRUE,
legend=names(cyl), cex=2,
fill=palette.colors(length(cyl), "Set 1"), border=NA,
title="Number of cylinders\n in 'mtcars'", title.font=2, title.cex=1.5)
title="Number of cylinders\n in 'mtcars'")
```

This demonstrates how easy is to improve or convert existing functions to be perfectly useable by baffle.
Expand Down

0 comments on commit ed400d8

Please sign in to comment.