Initial commit

This commit is contained in:
gnoblet 2022-05-01 11:36:23 +02:00
commit 9c569b86bb
24 changed files with 1283 additions and 0 deletions

22
man/cols_agora.Rd Normal file
View file

@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cols_agora.R
\name{cols_agora}
\alias{cols_agora}
\title{Function to extract AGORA colors as hex codes}
\usage{
cols_agora(..., unnamed = TRUE)
}
\arguments{
\item{...}{Character names of reach colors. If NULL returns all colors}
\item{unnamed}{Should the output vector be unnamed? Default to `TRUE`}
}
\value{
An hex code or hex codes named or unnamed
}
\description{
Function to extract AGORA colors as hex codes
}
\details{
This function needs to be modified to add colors
}

22
man/cols_reach.Rd Normal file
View file

@ -0,0 +1,22 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cols_reach.R
\name{cols_reach}
\alias{cols_reach}
\title{Function to extract REACH colors as hex codes}
\usage{
cols_reach(..., unnamed = TRUE)
}
\arguments{
\item{...}{Character names of reach colors. If NULL returns all colors}
\item{unnamed}{Should the output vector be unnamed? Default to `TRUE`}
}
\value{
An hex code or hex codes named or unnamed
}
\description{
Function to extract REACH colors as hex codes
}
\details{
This function needs to be modified to add colors
}

31
man/pal_agora.Rd Normal file
View file

@ -0,0 +1,31 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pal_agora.R
\name{pal_agora}
\alias{pal_agora}
\title{Return function to interpolate an AGORA color palette}
\usage{
pal_agora(
palette = "main",
reverse = FALSE,
color_ramp_palette = FALSE,
show_palettes = FALSE,
...
)
}
\arguments{
\item{palette}{Character name of a palette in AGORA palettes}
\item{reverse}{Boolean indicating whether the palette should be reversed}
\item{color_ramp_palette}{Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the former with `TRUE`}
\item{show_palettes}{Should the ouput be the set of palettes names to pick from? Default to `FALSE`}
\item{...}{Additional arguments to pass to colorRampPalette()}
}
\value{
A color palette
}
\description{
Return function to interpolate an AGORA color palette
}

31
man/pal_reach.Rd Normal file
View file

@ -0,0 +1,31 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pal_reach.R
\name{pal_reach}
\alias{pal_reach}
\title{Return function to interpolate a REACH color palette}
\usage{
pal_reach(
palette = "main",
reverse = FALSE,
color_ramp_palette = FALSE,
show_palettes = FALSE,
...
)
}
\arguments{
\item{palette}{Character name of a palette in REACH palettes}
\item{reverse}{Boolean indicating whether the palette should be reversed}
\item{color_ramp_palette}{Should the output be a `grDevices::colorRampPalette` function or a vector of hex codes? Default to the former with `TRUE`}
\item{show_palettes}{Should the ouput be the set of palettes names to pick from? Default to `FALSE`}
\item{...}{Additional arguments to pass to colorRampPalette()}
}
\value{
A color palette
}
\description{
Return function to interpolate a REACH color palette
}

44
man/scale_color.Rd Normal file
View file

@ -0,0 +1,44 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale.R
\name{scale_color}
\alias{scale_color}
\title{Color scale constructor for REACH or AGORA colors}
\usage{
scale_color(
initiative = "reach",
palette = "main",
discrete = TRUE,
reverse = FALSE,
...
)
scale_color(
initiative = "reach",
palette = "main",
discrete = TRUE,
reverse = FALSE,
...
)
}
\arguments{
\item{initiative}{Either "reach" or "agora}
\item{palette}{Character name of palette in drsimonj_palettes}
\item{discrete}{Boolean indicating whether color aesthetic is discrete or not}
\item{reverse}{Boolean indicating whether the palette should be reversed}
\item{...}{Additional arguments passed to discrete_scale() or
scale_fill_gradientn(), used respectively when discrete is TRUE or FALSE}
}
\value{
A color scale for ggplot
A fill scale for ggplot
}
\description{
Color scale constructor for REACH or AGORA colors
Fill scale constructor for REACH or AGORA colors
}

17
man/theme_reach.Rd Normal file
View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme_reach.R
\name{theme_reach}
\alias{theme_reach}
\title{Base REACH ggplot2 theme}
\usage{
theme_reach(family = "Leelawadee")
}
\arguments{
\item{family}{The font family. Default to "Leelawadee"}
}
\value{
The base REACH theme
}
\description{
Give some reach colors and fonts to a ggplot. Based on theme_bw()
}

View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme_reach.R
\name{theme_reach_borders}
\alias{theme_reach_borders}
\title{Some REACH theme for ggplot}
\usage{
theme_reach_borders(family = "Leelawadee")
}
\arguments{
\item{family}{The font family. Default to "Leelawadee"}
}
\value{
A theme to be added to the "+" ggplot grammar
}
\description{
Some REACH theme for ggplot
}

View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme_reach.R
\name{theme_reach_flip_hist}
\alias{theme_reach_flip_hist}
\title{Some reach more minimal theme for ggplot}
\usage{
theme_reach_flip_hist(family = "Leelawadee")
}
\arguments{
\item{family}{The font family. Default to "Leelawadee"}
}
\value{
A theme to be added to the "+" ggplot grammar
}
\description{
Give some REACH colors and fonts to a ggplot. Based on theme_bw(). To be used for horizontal bar charts.
}

17
man/theme_reach_hist.Rd Normal file
View file

@ -0,0 +1,17 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme_reach.R
\name{theme_reach_hist}
\alias{theme_reach_hist}
\title{Some reach more minimal theme for ggplot}
\usage{
theme_reach_hist(family = "Leelawadee")
}
\arguments{
\item{family}{The font family. Default to "Leelawadee"}
}
\value{
A theme to be added to the "+" ggplot grammar
}
\description{
Give some REACH colors and fonts to a ggplot. Based on theme_bw(). To be used for vertical bar charts.
}