From 7d72f7ed8b7697cb8282a3180ca3b6365aa5d155 Mon Sep 17 00:00:00 2001 From: nicolc11 Date: Mon, 13 May 2024 16:12:32 +0100 Subject: [PATCH 1/2] Fix for unexported data objects. --- .Rbuildignore | 1 + DESCRIPTION | 6 +- NAMESPACE | 3 + NEWS.md | 6 ++ R/data.R | 70 ------------- R/phs_colours.R | 2 - data-raw/phs_colour_values.R => R/phs_data.R | 98 +++++++++++++------ R/phs_pal1.R | 3 - R/phs_pal_name.R | 3 - R/phsstyles.R | 9 +- data/phs_colour_values.rda | Bin 471 -> 0 bytes data/phs_palette_types.rda | Bin 215 -> 0 bytes data/phs_palettes.rda | Bin 608 -> 0 bytes man/phs_colour_values.Rd | 23 ----- man/phs_data.Rd | 76 ++++++++++++++ man/phs_palette_types.Rd | 37 ------- man/phs_palettes.Rd | 37 ------- man/phsstyles.Rd | 19 ++++ tests/testthat/test-phs_colours.R | 2 +- 19 files changed, 180 insertions(+), 215 deletions(-) delete mode 100644 R/data.R rename data-raw/phs_colour_values.R => R/phs_data.R (61%) delete mode 100644 data/phs_colour_values.rda delete mode 100644 data/phs_palette_types.rda delete mode 100644 data/phs_palettes.rda delete mode 100644 man/phs_colour_values.Rd create mode 100644 man/phs_data.Rd delete mode 100644 man/phs_palette_types.Rd delete mode 100644 man/phs_palettes.Rd diff --git a/.Rbuildignore b/.Rbuildignore index 828a499..2c13ca3 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -8,3 +8,4 @@ ^docs$ ^pkgdown$ ^\.github$ +^README\.html$ diff --git a/DESCRIPTION b/DESCRIPTION index 8bd9346..24109b5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: phsstyles Title: Standard Graphic Styles for use in Public Health Scotland -Version: 0.1.1 +Version: 0.1.1.9000 Authors@R: c( person("Tina", "Fu", email = "Yuyan.Fu2@phs.scot", role = c("aut", "cre")), person("Bob", "Taylor", email = "bob.taylor2@phs.scot", role = "aut") @@ -17,6 +17,6 @@ Imports: Suggests: testthat (>= 3.0.0) Encoding: UTF-8 -LazyData: true -RoxygenNote: 7.2.0 +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.3.1 Config/testthat/edition: 3 diff --git a/NAMESPACE b/NAMESPACE index 8f1fda5..584d5eb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,7 +1,10 @@ # Generated by roxygen2: do not edit by hand export(phs_colors) +export(phs_colour_values) export(phs_colours) +export(phs_palette_types) +export(phs_palettes) export(scale_color_continuous_phs) export(scale_color_discrete_phs) export(scale_colour_continuous_phs) diff --git a/NEWS.md b/NEWS.md index efeba79..a6e37f6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# phsstyles (Development version) + +* Exported `phs_colours`, `phs_palettes` and `phs_palette_types`. +This now allows users to call phsstyles functions +without needing to load the package. + # phsstyles 0.1.0 (2021-10-15) - Initial package release. diff --git a/R/data.R b/R/data.R deleted file mode 100644 index fb7a71d..0000000 --- a/R/data.R +++ /dev/null @@ -1,70 +0,0 @@ -#' PHS colour names and their hex code. -#' -#' A vector containing PHS colour names and their corresponding hex code. -#' It is used within \code{\link{phs_colours}}. -#' -#' @details It contains PHS colour names in the PHS chart and dashboard guidance, such as PHS blue. -#' -#' @format A character vector -#' @source \url{http://spark.publichealthscotland.org/media/2176/chart-and-dashboard-accessibility-guidance-version-12.pdf} -"phs_colour_values" - -#' PHS palettes -#' -#' A list grouping PHS colours into palettes. -#' It is used within \code{\link{scale_colour_discrete_phs}}, -#' \code{\link{scale_colour_continuous_phs}}, -#' \code{\link{scale_fill_discrete_phs}} and -#' \code{\link{scale_fill_continuous_phs}}. -#' -#' @details It contains PHS colour palettes such as main, main-purples. -#' The palettes and their types are listed below. -#' -#' | **Qualitative** | **Sequential** | -#' | --- | --- | -#' | main | x | -#' | supporting | x | -#' | all | x | -#' | x | main-purples | -#' | x | main-magentas | -#' | x | main-blues | -#' | x | main-greens | -#' | x | supporting-graphites | -#' | x | supporting-teals | -#' | x | supporting-liberties | -#' | x | supporting-rusts | -#' -#'@md -#' -#' @format A character list -"phs_palettes" - -#' PHS palette types -#' -#' A list grouping PHS palettes into PHS palettes types. -#' It is used within \code{\link{scale_colour_discrete_phs}}, -#' \code{\link{scale_colour_continuous_phs}}, -#' \code{\link{scale_fill_discrete_phs}} and -#' \code{\link{scale_fill_continuous_phs}}. -#' -#' @details It groups PHS palettes into two types - qualitative and sequential. -#' The palettes and their types are listed below. -#' -#' | **Qualitative** | **Sequential** | -#' | --- | --- | -#' | main | x | -#' | supporting | x | -#' | all | x | -#' | x | main-purples | -#' | x | main-magentas | -#' | x | main-blues | -#' | x | main-greens | -#' | x | supporting-graphites | -#' | x | supporting-teals | -#' | x | supporting-liberties | -#' | x | supporting-rusts | -#' -#'@md -#' -#' @format A character list -"phs_palette_types" diff --git a/R/phs_colours.R b/R/phs_colours.R index afab782..cfe77d1 100644 --- a/R/phs_colours.R +++ b/R/phs_colours.R @@ -18,8 +18,6 @@ #' #' @export phs_colours <- function(colourname = NULL, keep_names = FALSE){ - # load the vector phs_colour_values - phs_colour_values <- phsstyles::phs_colour_values if (is.null(colourname)) { phs_colour_values diff --git a/data-raw/phs_colour_values.R b/R/phs_data.R similarity index 61% rename from data-raw/phs_colour_values.R rename to R/phs_data.R index 1dcadb0..1c9c3a9 100644 --- a/data-raw/phs_colour_values.R +++ b/R/phs_data.R @@ -1,16 +1,56 @@ -### This script creates the list of standard colours in Public Health Scotland -### based on Chart and Dashboard Accessibility Guidance. -### -### The resulting file is used inside the phs_colours function and is made -### available to users of the package via phsstyles::phs_colour_values -### -### This script should be re-run prior to every package release, to ensure the -### most up-to-date information provided by Chart and Dashboard Accessibility -### Guidance is used -### -### Any substantial changes to the data should be noted in the section -### pertaining to the latest release in the NEWS.md file - +#' PHS colours and colour palettes +#' +#' @details +#' +#' ### PHS colours +#' +#' PHS colour names and their corresponding hex codes. +#' +#' `phs_colour_values` is a character vector that contains PHS colour names +#' in the PHS chart and dashboard guidance, such as PHS blue. +#' +#' ### PHS palettes +#' +#' A list grouping PHS colours into palettes. +#' It is used within \code{\link{scale_colour_discrete_phs}}, +#' \code{\link{scale_colour_continuous_phs}}, +#' \code{\link{scale_fill_discrete_phs}} and +#' \code{\link{scale_fill_continuous_phs}}. +#' +#' It contains PHS colour palettes such as main, main-purples. +#' +#' ### PHS palette types +#' +#' A list grouping PHS palettes into PHS palette types. +#' It is used within \code{\link{scale_colour_discrete_phs}}, +#' \code{\link{scale_colour_continuous_phs}}, +#' \code{\link{scale_fill_discrete_phs}} and +#' \code{\link{scale_fill_continuous_phs}}. +#' +#' It groups PHS palettes into two types - qualitative and sequential. +#' +#' The palettes and their types are listed below. +#' +#' | **Qualitative** | **Sequential** | +#' | --- | --- | +#' | main | x | +#' | supporting | x | +#' | all | x | +#' | x | main-purples | +#' | x | main-magentas | +#' | x | main-blues | +#' | x | main-greens | +#' | x | supporting-graphites | +#' | x | supporting-teals | +#' | x | supporting-liberties | +#' | x | supporting-rusts | +#' +#' @source \url{http://spark.publichealthscotland.org/media/2176/chart-and-dashboard-accessibility-guidance-version-12.pdf} +#' +#' +#' @rdname phs_data +#' @format `phs_colour_values` - A `character` vector of PHS colours and hex codes. +#' @export phs_colour_values <- c( # main palette, for qualitative plots "phs-purple" = "#3F3685", @@ -57,56 +97,58 @@ phs_colour_values <- c( "phs-rust-30" = "#EEC4BA", "phs-rust-10" = "#F9EBE8") +#' @rdname phs_data +#' @format `phs_colour_palettes` - A `list` of PHS colours grouped into palettes. +#' @export phs_palettes <- list( - "main" = phsstyles::phs_colours(c("phs-purple", "phs-magenta", + "main" = phs_colours(c("phs-purple", "phs-magenta", "phs-blue", "phs-green"), keep_names = TRUE), - "supporting" = phsstyles::phs_colours(c("phs-graphite", "phs-teal", + "supporting" = phs_colours(c("phs-graphite", "phs-teal", "phs-liberty", "phs-rust"), keep_names = TRUE), - "all" = phsstyles::phs_colours(c("phs-purple", "phs-magenta", + "all" = phs_colours(c("phs-purple", "phs-magenta", "phs-blue", "phs-green", "phs-graphite", "phs-teal", "phs-liberty", "phs-rust"), keep_names = TRUE), - "main-purples" = phsstyles::phs_colours(c("phs-purple", "phs-purple-80", + "main-purples" = phs_colours(c("phs-purple", "phs-purple-80", "phs-purple-50", "phs-purple-30", "phs-purple-10"), keep_names = TRUE), - "main-magentas" = phsstyles::phs_colours(c("phs-magenta", "phs-magenta-80", + "main-magentas" = phs_colours(c("phs-magenta", "phs-magenta-80", "phs-magenta-50", "phs-magenta-30", "phs-magenta-10"), keep_names = TRUE), - "main-blues" = phsstyles::phs_colours(c("phs-blue", "phs-blue-80", + "main-blues" = phs_colours(c("phs-blue", "phs-blue-80", "phs-blue-50", "phs-blue-30", "phs-blue-10"), keep_names = TRUE), - "main-greens" = phsstyles::phs_colours(c("phs-green", "phs-green-80", + "main-greens" = phs_colours(c("phs-green", "phs-green-80", "phs-green-50", "phs-green-30", "phs-green-10"), keep_names = TRUE), - "supporting-graphites" = phsstyles::phs_colours(c("phs-graphite", + "supporting-graphites" = phs_colours(c("phs-graphite", "phs-graphite-80", "phs-graphite-50", "phs-graphite-30", "phs-graphite-10"), keep_names = TRUE), - "supporting-teals" = phsstyles::phs_colours(c("phs-teal", "phs-teal-80", + "supporting-teals" = phs_colours(c("phs-teal", "phs-teal-80", "phs-teal-50", "phs-teal-30", "phs-teal-10"), keep_names = TRUE), - "supporting-liberties" = phsstyles::phs_colours(c("phs-liberty", + "supporting-liberties" = phs_colours(c("phs-liberty", "phs-liberty-80", "phs-liberty-50", "phs-liberty-30", "phs-liberty-10"), keep_names = TRUE), - "supporting-rusts" = phsstyles::phs_colours(c("phs-rust", "phs-rust-80", + "supporting-rusts" = phs_colours(c("phs-rust", "phs-rust-80", "phs-rust-50", "phs-rust-30", "phs-rust-10"), keep_names = TRUE)) - +#' @rdname phs_data +#' @format `phs_palette_types` - A `list` of PHS palettes grouped into palette types. +#' @export phs_palette_types <- list( qual = c("main", "supporting", "all"), seq = c("main-purples", "main-magentas", "main-blues", "main-greens", "supporting-graphites", "supporting-teals", "supporting-liberties", "supporting-rusts")) - -usethis::use_data(phs_colour_values, phs_palettes, phs_palette_types, - overwrite = TRUE) diff --git a/R/phs_pal1.R b/R/phs_pal1.R index becf45a..96fc945 100644 --- a/R/phs_pal1.R +++ b/R/phs_pal1.R @@ -1,7 +1,4 @@ phs_pal1 <- function(n, name) { - # load the list phs_palettes - phs_palettes <- phsstyles::phs_palettes - if (!(name %in% names(phs_palettes))) { stop(paste(name,"is not a valid palette name.\n")) } diff --git a/R/phs_pal_name.R b/R/phs_pal_name.R index febd7a2..8449aba 100644 --- a/R/phs_pal_name.R +++ b/R/phs_pal_name.R @@ -1,7 +1,4 @@ phs_pal_name <- function(palette, type) { - # load the list phs_palette_types - phs_palette_types <- phsstyles::phs_palette_types - if (is.character(palette)) { if (!palette %in% unlist(phs_palette_types)) { warning("Unknown palette ", palette) diff --git a/R/phsstyles.R b/R/phsstyles.R index 73d3372..185b827 100644 --- a/R/phsstyles.R +++ b/R/phsstyles.R @@ -5,12 +5,5 @@ #' See the README on #' \href{https://github.com/Public-Health-Scotland/phsstyles#readme}{GitHub}. #' -#' @docType package #' @name phsstyles -NULL - -# Stops notes from appearing in R CMD check because of undefined global -# variables -if (getRversion() >= "2.15.1") utils::globalVariables(c("phs_colour_values", - "phs_palette_types", - "phs_palettes")) +"_PACKAGE" diff --git a/data/phs_colour_values.rda b/data/phs_colour_values.rda deleted file mode 100644 index 01217a4a49c1bb29f62bd4a30d35ea20e8f7854d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 471 zcmV;|0Vw`LT4*^jL0KkKS!5i??EnHZe}Mo0-~b3hf8aj=5J0-;-yi@1Kmputg98l> z0004?00006rc9boQG$>F&;S4c3X|Weqeg~}41n1aCX5g?Vrhg?6lFa?13~E;G5`ZX zrqq(^+<>2vzGTAJ7HLsSqUpTL&C_K&BNW#*if6^5ne)YlJamfE+SqnSZJpHe!`R>C z4K$EG;eVhUoT8>-1cei>2_ff!M9l)L?ZqI4V9)@7AosmRio~&uQA{eVRZJ?ZRZmy~ z1AA+KTtEN-07_B-08sJ25~)HErKwBJfrhw2loMlt&A=Hak1i!=&Y8Q3N?4T|a}y0f z16ndGu;H;iklMwoGr9}Z0K#=>mMEz_N`o?3;}vZr^EG!0XiiUaBcegpejz-mmX^==vFW+G;0W=9%qCZzpMt28CTU@Bai(y2tMVQN;1 z7bciYHY%Tgf%~jANK;ru1^U9ugg{}DH&crskekUwgN+2DWlPfZ#+IiD@^YmT`_oDO NF64@Ep&-aPkJ|b6&xim3 diff --git a/data/phs_palette_types.rda b/data/phs_palette_types.rda deleted file mode 100644 index c31e2bc427111fb671cbfc6c9c399325399093a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmV;|04V=LT4*^jL0KkKSsLw0h5!I#e}MmfYybcP5C8-K5J0l${vZGWFaWl|l!=ix z6!jWmG|(|Nh&0s(Mt}eYfB?ln000004hfkkh%BRp2TE(GIr)ebP?P~8A!IfNJo>ma zBFYZ~DJ2qTL4b&L01L?V^U-Au=>4GhV)rfxZ4#l4 zVhTcZP{lPvm)^|v)~KPXknBAP@l5b)7NIUuz-1gD)t5P8eb?h%{2P@y_Vp7e-8nG} RX|FT*yOJrwgn-v-OfZXIR>%MV diff --git a/data/phs_palettes.rda b/data/phs_palettes.rda deleted file mode 100644 index 7e40150ae5a3519fbac1e7434dba0a002ca9f8fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 608 zcmV-m0-yatT4*^jL0KkKS-HC_Q~(3Ae}Mo0%m4@if8aj=5J0l$-XH)0zyiJ8ws9;D z86XqVV59(P=>Px#F&KnKrkW5mXwU(mXaEM%p$vck0MkGK00B}eWYl6ulo{%S)DKVq z2dME&YSpyUb`=RJP;R@49C}Ey|9QXF6Mw0ephBNe6hf8FsmrCQr^O`%fePCJNX6@f zX|od6T6I5MCfHd!&M^#BRlApOX{%K3Zbj6K;`Z2k>)`ua59U71OC4G_UtDque6*%6 zIY@@3(*gKngpHJ0Nsz>rBqWIh0MZb(H2{VrWTX-8sRDj`Y>9%DC{-0tfRiP&oW~sq z#5_uAnR%4cGV?1CAc4+6NiYb2NC<#<*_%$iX(WN92BZip%X zh!Qo51Px3Y7rI!50h&Cw7_4)FTa?<(DhrE?G_+atJ!lmM3c)pnrgPRB?6RUPV<{Qn zUa^O&HOO(1jT-?;&3$6$psZUh_s^~h2!U*<<*gXXIqqeZnabL;wais8iB&IG#@ zo-N?lC-x_rPFyd4F{hB;Ez)q7yQ;gpySQR99YhmjtEe;0B^I8czeyDL;%nG(_f diff --git a/man/phs_colour_values.Rd b/man/phs_colour_values.Rd deleted file mode 100644 index 52b087f..0000000 --- a/man/phs_colour_values.Rd +++ /dev/null @@ -1,23 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{phs_colour_values} -\alias{phs_colour_values} -\title{PHS colour names and their hex code.} -\format{ -A character vector -} -\source{ -\url{http://spark.publichealthscotland.org/media/2176/chart-and-dashboard-accessibility-guidance-version-12.pdf} -} -\usage{ -phs_colour_values -} -\description{ -A vector containing PHS colour names and their corresponding hex code. -It is used within \code{\link{phs_colours}}. -} -\details{ -It contains PHS colour names in the PHS chart and dashboard guidance, such as PHS blue. -} -\keyword{datasets} diff --git a/man/phs_data.Rd b/man/phs_data.Rd new file mode 100644 index 0000000..b6bd596 --- /dev/null +++ b/man/phs_data.Rd @@ -0,0 +1,76 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/phs_data.R +\docType{data} +\name{phs_colour_values} +\alias{phs_colour_values} +\alias{phs_palettes} +\alias{phs_palette_types} +\title{PHS colours and colour palettes} +\format{ +\code{phs_colour_values} - A \code{character} vector of PHS colours and hex codes. + +\code{phs_colour_palettes} - A \code{list} of PHS colours grouped into palettes. + +\code{phs_palette_types} - A \code{list} of PHS palettes grouped into palette types. +} +\source{ +\url{http://spark.publichealthscotland.org/media/2176/chart-and-dashboard-accessibility-guidance-version-12.pdf} +} +\usage{ +phs_colour_values + +phs_palettes + +phs_palette_types +} +\description{ +PHS colours and colour palettes +} +\details{ +\subsection{PHS colours}{ + +PHS colour names and their corresponding hex codes. + +\code{phs_colour_values} is a character vector that contains PHS colour names +in the PHS chart and dashboard guidance, such as PHS blue. +} + +\subsection{PHS palettes}{ + +A list grouping PHS colours into palettes. +It is used within \code{\link{scale_colour_discrete_phs}}, +\code{\link{scale_colour_continuous_phs}}, +\code{\link{scale_fill_discrete_phs}} and +\code{\link{scale_fill_continuous_phs}}. + +It contains PHS colour palettes such as main, main-purples. +} + +\subsection{PHS palette types}{ + +A list grouping PHS palettes into PHS palette types. +It is used within \code{\link{scale_colour_discrete_phs}}, +\code{\link{scale_colour_continuous_phs}}, +\code{\link{scale_fill_discrete_phs}} and +\code{\link{scale_fill_continuous_phs}}. + +It groups PHS palettes into two types - qualitative and sequential. + +The palettes and their types are listed below.\tabular{ll}{ + \strong{Qualitative} \tab \strong{Sequential} \cr + main \tab x \cr + supporting \tab x \cr + all \tab x \cr + x \tab main-purples \cr + x \tab main-magentas \cr + x \tab main-blues \cr + x \tab main-greens \cr + x \tab supporting-graphites \cr + x \tab supporting-teals \cr + x \tab supporting-liberties \cr + x \tab supporting-rusts \cr +} + +} +} +\keyword{datasets} diff --git a/man/phs_palette_types.Rd b/man/phs_palette_types.Rd deleted file mode 100644 index 01dfb4e..0000000 --- a/man/phs_palette_types.Rd +++ /dev/null @@ -1,37 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{phs_palette_types} -\alias{phs_palette_types} -\title{PHS palette types} -\format{ -A character list -} -\usage{ -phs_palette_types -} -\description{ -A list grouping PHS palettes into PHS palettes types. -It is used within \code{\link{scale_colour_discrete_phs}}, -\code{\link{scale_colour_continuous_phs}}, -\code{\link{scale_fill_discrete_phs}} and -\code{\link{scale_fill_continuous_phs}}. -} -\details{ -It groups PHS palettes into two types - qualitative and sequential. -The palettes and their types are listed below.\tabular{ll}{ - \strong{Qualitative} \tab \strong{Sequential} \cr - main \tab x \cr - supporting \tab x \cr - all \tab x \cr - x \tab main-purples \cr - x \tab main-magentas \cr - x \tab main-blues \cr - x \tab main-greens \cr - x \tab supporting-graphites \cr - x \tab supporting-teals \cr - x \tab supporting-liberties \cr - x \tab supporting-rusts \cr -} -} -\keyword{datasets} diff --git a/man/phs_palettes.Rd b/man/phs_palettes.Rd deleted file mode 100644 index aca1dcb..0000000 --- a/man/phs_palettes.Rd +++ /dev/null @@ -1,37 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/data.R -\docType{data} -\name{phs_palettes} -\alias{phs_palettes} -\title{PHS palettes} -\format{ -A character list -} -\usage{ -phs_palettes -} -\description{ -A list grouping PHS colours into palettes. -It is used within \code{\link{scale_colour_discrete_phs}}, -\code{\link{scale_colour_continuous_phs}}, -\code{\link{scale_fill_discrete_phs}} and -\code{\link{scale_fill_continuous_phs}}. -} -\details{ -It contains PHS colour palettes such as main, main-purples. -The palettes and their types are listed below.\tabular{ll}{ - \strong{Qualitative} \tab \strong{Sequential} \cr - main \tab x \cr - supporting \tab x \cr - all \tab x \cr - x \tab main-purples \cr - x \tab main-magentas \cr - x \tab main-blues \cr - x \tab main-greens \cr - x \tab supporting-graphites \cr - x \tab supporting-teals \cr - x \tab supporting-liberties \cr - x \tab supporting-rusts \cr -} -} -\keyword{datasets} diff --git a/man/phsstyles.Rd b/man/phsstyles.Rd index b3edef0..4b1073c 100644 --- a/man/phsstyles.Rd +++ b/man/phsstyles.Rd @@ -2,6 +2,7 @@ % Please edit documentation in R/phsstyles.R \docType{package} \name{phsstyles} +\alias{phsstyles-package} \alias{phsstyles} \title{\code{phsstyles} package} \description{ @@ -11,3 +12,21 @@ Standard graphic styles for use in PHS. See the README on \href{https://github.com/Public-Health-Scotland/phsstyles#readme}{GitHub}. } +\seealso{ +Useful links: +\itemize{ + \item \url{https://github.com/Public-Health-Scotland/phsstyles} + \item \url{https://public-health-scotland.github.io/phsstyles/} + \item Report bugs at \url{https://github.com/Public-Health-Scotland/phsstyles/issues} +} + +} +\author{ +\strong{Maintainer}: Tina Fu \email{Yuyan.Fu2@phs.scot} + +Authors: +\itemize{ + \item Bob Taylor \email{bob.taylor2@phs.scot} +} + +} diff --git a/tests/testthat/test-phs_colours.R b/tests/testthat/test-phs_colours.R index 3d36486..049764b 100644 --- a/tests/testthat/test-phs_colours.R +++ b/tests/testthat/test-phs_colours.R @@ -1,5 +1,5 @@ test_that("All available colours are shown when colourname is NULL", { - expect_equal(phs_colours(), phsstyles::phs_colour_values) + expect_equal(phs_colours(), phs_colour_values) }) test_that("Hex colour is generated for specific named colours", { From b99705adb98028261e10787ad777d87d0bf85491 Mon Sep 17 00:00:00 2001 From: Tina Fu Date: Tue, 6 Aug 2024 11:28:25 +0100 Subject: [PATCH 2/2] fix desc and news --- DESCRIPTION | 2 +- NEWS.md | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 24109b5..6c4f9e4 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: phsstyles Title: Standard Graphic Styles for use in Public Health Scotland -Version: 0.1.1.9000 +Version: 0.1.2 Authors@R: c( person("Tina", "Fu", email = "Yuyan.Fu2@phs.scot", role = c("aut", "cre")), person("Bob", "Taylor", email = "bob.taylor2@phs.scot", role = "aut") diff --git a/NEWS.md b/NEWS.md index a6e37f6..ec739cb 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,16 +1,9 @@ -# phsstyles (Development version) +# phsstyles 0.1.2 (2024-08-06) -* Exported `phs_colours`, `phs_palettes` and `phs_palette_types`. +- Exported `phs_colour_values`, `phs_palettes` and `phs_palette_types`. This now allows users to call phsstyles functions without needing to load the package. -# phsstyles 0.1.0 (2021-10-15) - -- Initial package release. -- `phs_colours()`, `theme_phs()`, `scale_colour_discrete_phs()`, -`scale_colour_continuous_phs()`, `scale_fill_discrete_phs()` and -`scale_fill_continuous_phs()` functions added. - # phsstyles 0.1.1 (2022-05-30) - Make axis title not blank in `theme_phs()` ([#3](https://github.com/Public-Health-Scotland/phsstyles/issues/3)). @@ -20,3 +13,11 @@ without needing to load the package. - Update the documentation for `phs_palettes` and `phs_palette_types`. - Create a [pkgdown webpage](https://public-health-scotland.github.io/phsstyles/) so that readme, help pages and news page are integrated. + +# phsstyles 0.1.0 (2021-10-15) + +- Initial package release. +- `phs_colours()`, `theme_phs()`, `scale_colour_discrete_phs()`, +`scale_colour_continuous_phs()`, `scale_fill_discrete_phs()` and +`scale_fill_continuous_phs()` functions added. +