From ed400d8f232ebe76850e91134bbf1804bf28f9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Moravec?= Date: Sat, 26 Aug 2023 00:19:47 +1200 Subject: [PATCH] Fixed Roxygen package documentation issue with _PACKAGE sentinel --- DESCRIPTION | 4 ++-- R/baffle.r | 4 ++-- man/{baffle.Rd => baffle-package.Rd} | 17 ++++++++++++++++- vignettes/baffle.Rmd | 6 +++--- 4 files changed, 23 insertions(+), 8 deletions(-) rename man/{baffle.Rd => baffle-package.Rd} (67%) diff --git a/DESCRIPTION b/DESCRIPTION index f342341..10236ba 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -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", @@ -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 diff --git a/R/baffle.r b/R/baffle.r index e44371f..2864813 100644 --- a/R/baffle.r +++ b/R/baffle.r @@ -10,5 +10,5 @@ #' proportional ratios. #' #' @docType package -#' @name baffle -NULL +#' @keywords internal +"_PACKAGE" diff --git a/man/baffle.Rd b/man/baffle-package.Rd similarity index 67% rename from man/baffle.Rd rename to man/baffle-package.Rd index 025ad8e..f0c0a7d 100644 --- a/man/baffle.Rd +++ b/man/baffle-package.Rd @@ -1,8 +1,9 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/baffle.r \docType{package} -\name{baffle} +\name{baffle-package} \alias{baffle} +\alias{baffle-package} \title{Baffle: Waffle graphs with base graphics} \description{ The package provides functions to make waffle graphs in the base graphics. @@ -15,3 +16,17 @@ While the original waffle charts were rectangular with 10 rows and columns, with representing 1%, they are nowadays popular in various infographics to visualize any proportional ratios. } +\seealso{ +Useful links: +\itemize{ + \item \url{https://j-moravec.github.io/baffle/} + \item \url{https://github.com/j-moravec/baffle} + \item Report bugs at \url{https://github.com/j-moravec/baffle/issues} +} + +} +\author{ +\strong{Maintainer}: Jiří Moravec \email{jiri.c.moravec@gmail.com} + +} +\keyword{internal} diff --git a/vignettes/baffle.Rmd b/vignettes/baffle.Rmd index 789555c..592ebd7 100644 --- a/vignettes/baffle.Rmd +++ b/vignettes/baffle.Rmd @@ -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 @@ -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! @@ -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.