diff --git a/R/netplot-package.R b/R/netplot-package.R index 2e9ef4f..0436c0f 100644 --- a/R/netplot-package.R +++ b/R/netplot-package.R @@ -10,4 +10,7 @@ #' "netplot")` for mapping vertex/edge aesthetics from graph attributes. #' #' @keywords internal +#' @section How to cite: +#' If you use \pkg{netplot} in published work, please cite it. Run +#' \code{citation("netplot")} in R for the full entry. "_PACKAGE" diff --git a/R/zzz.R b/R/zzz.R new file mode 100644 index 0000000..32e670d --- /dev/null +++ b/R/zzz.R @@ -0,0 +1,5 @@ +.onAttach <- function(libname, pkgname) { + packageStartupMessage( + "Using netplot in your research? Please cite it: citation(\"netplot\")" + ) +} diff --git a/README.md b/README.md index e21711d..18dc3d5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,16 @@ status](https://www.r-pkg.org/badges/version/netplot)](https://cran.r-project.or # netplot rgexf hex sticker logo + + +> [!NOTE] +> **How to cite netplot.** If you use **netplot** in published work, please cite it: +> +> Vega Yon G, Bischoff P. *netplot: Beautiful Graph Drawing*. doi:[10.32614/CRAN.package.netplot](https://doi.org/10.32614/CRAN.package.netplot) +> +> Run `citation("netplot")` in R for the BibTeX entry. + + **netplot** is a graph visualization engine for R that emphasizes *aesthetics*. Its defaults are chosen so that a single call to `nplot()` produces a publication-quality figure out of the box, while still giving diff --git a/README.qmd b/README.qmd index c3ec58a..370da71 100644 --- a/README.qmd +++ b/README.qmd @@ -26,6 +26,16 @@ status](https://www.r-pkg.org/badges/version/netplot)](https://cran.r-project.or # netplot rgexf hex sticker logo + + +> [!NOTE] +> **How to cite netplot.** If you use **netplot** in published work, please cite it: +> +> Vega Yon G, Bischoff P. *netplot: Beautiful Graph Drawing*. doi:[10.32614/CRAN.package.netplot](https://doi.org/10.32614/CRAN.package.netplot) +> +> Run `citation("netplot")` in R for the BibTeX entry. + + **netplot** is a graph visualization engine for R that emphasizes *aesthetics*. Its defaults are chosen so that a single call to `nplot()` produces a publication-quality figure out of the box, while still giving you fine-grained diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 0000000..0304e7f --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,25 @@ +# Year resolution: CRAN sets Date/Publication on the installed package; fall +# back to DESCRIPTION's Date, then to the current year, so the package entry +# never renders as "(????)". +year <- if (!is.null(meta$`Date/Publication`)) { + substr(meta$`Date/Publication`, 1, 4) +} else if (!is.null(meta$Date)) { + substr(meta$Date, 1, 4) +} else { + format(Sys.Date(), "%Y") +} +note <- sprintf("R package version %s", meta$Version) + +bibentry( + bibtype = "Manual", + title = "{{netplot: Beautiful Graph Drawing}}", + author = c( + person("George", "Vega Yon", comment = c(ORCID = "0000-0002-3171-0844")), + person("Porter", "Bischoff", comment = c(ORCID = "0009-0004-6742-6281")) + ), + year = year, + note = note, + url = "https://github.com/USCCANA/netplot", + doi = "10.32614/CRAN.package.netplot", + header = "To cite netplot in publications use:" +) diff --git a/man/netplot-package.Rd b/man/netplot-package.Rd index 28f5a96..42e0ab1 100644 --- a/man/netplot-package.Rd +++ b/man/netplot-package.Rd @@ -33,3 +33,7 @@ Authors: } \keyword{internal} +\section{How to cite}{ + If you use \pkg{netplot} in published work, please cite it. Run + \code{citation("netplot")} in R for the full entry. +} diff --git a/vignettes/base-and-grid.Rmd b/vignettes/base-and-grid.Rmd index 0dd76ec..2e0f1a2 100644 --- a/vignettes/base-and-grid.Rmd +++ b/vignettes/base-and-grid.Rmd @@ -9,6 +9,11 @@ vignette: > %\VignetteEncoding{UTF-8} --- + +> **How to cite.** If you use **netplot** in published work, please cite it — run +> `citation("netplot")` in R for the full entry. + + Working with grid graphics provides flexibility that is harder to get when using base graphics. Nevertheless, a lot of users may still be more comfortable with base graphics, so this document shows a few examples of how to mix both of them using the [`gridBase`](https://cran.r-project.org/package=gridBase) package. First, we load igraph to simulate a small network and complement that with uninteresting correlated data: diff --git a/vignettes/examples.Rmd b/vignettes/examples.Rmd index 0ee80af..2f0fb72 100644 --- a/vignettes/examples.Rmd +++ b/vignettes/examples.Rmd @@ -9,6 +9,11 @@ vignette: > %\VignetteEncoding{UTF-8} --- + +> **How to cite.** If you use **netplot** in published work, please cite it — run +> `citation("netplot")` in R for the full entry. + + Some features: 1. Auto-scaling of vertices using sizes relative to the plotting device. diff --git a/vignettes/formulas.Rmd b/vignettes/formulas.Rmd index 7244507..67f30f2 100644 --- a/vignettes/formulas.Rmd +++ b/vignettes/formulas.Rmd @@ -9,6 +9,11 @@ vignette: > %\VignetteEncoding{UTF-8} --- + +> **How to cite.** If you use **netplot** in published work, please cite it — run +> `citation("netplot")` in R for the full entry. + + ```{r setup, include = FALSE} knitr::opts_chunk$set( collapse = TRUE,