Package 'NHSRtheme'

Title: NHS R Theme
Description: Provides theme's based on the [https://www.england.nhs.uk/nhsidentity/](NHS Identity).
Authors: Tom Jemmett [aut, cre] , NHS-R Community [cph], Silvia Canelon [ctb] , Adam Ivison [ctb], John MacKintosh [ctb], Chris Mainey [ctb]
Maintainer: Tom Jemmett <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-11-19 11:19:47 UTC
Source: https://github.com/nhs-r-community/NHSRtheme

Help Index


Get's tints of the NHS identity colours

Description

This function returns tints of the NHS identity colours

Usage

get_nhs_colour_tints(tints, ..., section = NULL)

Arguments

tints

a vector of numbers between 0 and 1 for the percentage colour tint to use

...

optional names of the colours to return

section

optional, name of the colour sections to use

Value

named vector of hexadecimal strings of colours

Examples

get_nhs_colour_tints(seq(0.0,0.8,0.2))
get_nhs_colour_tints(seq(0.0,0.8,0.2), "Blue", "Red")
get_nhs_colour_tints(seq(0.0,0.8,0.2), section = "blues")

Get's the NHS identity colours

Description

This function gets the colours as defined by the NHS Identity

Usage

get_nhs_colours(..., section = NULL)

Arguments

...

optional names of the colours to return

section

optional, name of the colour sections to use

Value

named vector of hexadecimal strings of colours

Examples

get_nhs_colours()
get_nhs_colours("Blue")
get_nhs_colours("Blue", "Red")
get_nhs_colours(section = "blues")

Return function to interpolate an Nhs theme colour palette

Description

Return function to interpolate an Nhs theme colour palette

Usage

get_nhs_palette(palette = "main", reverse = FALSE, ...)

Arguments

palette

Character name of section in Nhs theme

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments to pass to colorRampPalette()


NHSRtheme package

Description

NHS Theme

Details

#' See the README on https://github.com/tomjemmet/NHSRtheme/


Color scale constructor for NHS theme colours

Description

Color scale constructor for NHS theme colours

Usage

scale_colour_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in NHS theme

discrete

Boolean indicating whether colour aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_colour_gradientn(), used respectively when discrete is TRUE or FALSE


Fill scale constructor for NHS theme colours

Description

Fill scale constructor for NHS theme colours

Usage

scale_fill_nhs(palette = "main", discrete = TRUE, reverse = FALSE, ...)

Arguments

palette

Character name of palette in NHS theme

discrete

Boolean indicating whether colour aesthetic is discrete or not

reverse

Boolean indicating whether the palette should be reversed

...

Additional arguments passed to discrete_scale() or scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE


Show's the NHS identity colours

Description

This function shows the tints of a colour from the Nhs Theme

Usage

show_nhs_theme_colour_tints(tints, colour)

Arguments

tints

a vector of numbers between 0 and 1 that represents the percentage tints required

colour

the name of the colour to show tints of

Value

named vector of hexadecimal strings of colours

Examples

show_nhs_theme_colour_tints(seq(0,1,0.1), "Blue")

Show's the NHS identity colours

Description

This function shows the available colours in the NHS theme, as defined by the NHS Identity

Usage

show_nhs_theme_colours()

Value

named vector of hexadecimal strings of colours

Examples

show_nhs_theme_colours()

Add NHS theme to ggplot chart

Description

This adds a theme to your chart to follow the NHS Identity

Usage

theme_nhs()