Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d220d9
commit ef667be
Showing
26 changed files
with
1,496 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
Package: gglgbtq | ||
Type: Package | ||
Title: Show Pride on 'ggplot2' Plots | ||
Version: 0.1.0 | ||
Date: 2022-08-06 | ||
Version: 0.1.1 | ||
Date: 2022-11-01 | ||
Authors@R: c(person("Laura", "Bakala", | ||
email = "erdaradun.gaztea@gmail.com", | ||
role = c("cre", "aut", "cph"))) | ||
role = c("cre", "aut", "cph"), | ||
comment = c(ORCID = "0000-0002-3213-2484"))) | ||
Description: Provides multiple palettes based on pride flags with tailored themes. | ||
Imports: ggplot2, graphics, grDevices | ||
Suggests: spelling, testthat (>= 3.0.0) | ||
Suggests: knitr, rmarkdown, spelling, testthat (>= 3.0.0) | ||
License: GPL (>= 3) | ||
Encoding: UTF-8 | ||
RoxygenNote: 7.1.2 | ||
Config/testthat/edition: 3 | ||
URL: https://github.com/turtletopia/gglgbtq | ||
URL: https://github.com/turtletopia/gglgbtq, | ||
https://turtletopia.github.io/gglgbtq/ | ||
Language: en-US | ||
VignetteBuilder: knitr | ||
NeedsCompilation: no | ||
Packaged: 2022-08-14 08:37:36 UTC; matib | ||
Author: Laura Bakala [cre, aut, cph] | ||
Packaged: 2022-11-01 10:14:44 UTC; erdar | ||
Author: Laura Bakala [cre, aut, cph] (<https://orcid.org/0000-0002-3213-2484>) | ||
Maintainer: Laura Bakala <erdaradun.gaztea@gmail.com> | ||
Repository: CRAN | ||
Date/Publication: 2022-08-16 09:00:05 UTC | ||
Date/Publication: 2022-11-01 10:40:16 UTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,29 @@ | ||
26c9fa10252192a94c9183aa22ed7a5f *DESCRIPTION | ||
c75b33ed5c95e80cb6c612b23547e423 *NAMESPACE | ||
a97a1a3ea30bdfe03c66763a0d30be07 *NEWS.md | ||
30e4a4ea31d100cb624016f739a19080 *DESCRIPTION | ||
210abc7c362b85ca3ab5b69af8088749 *NAMESPACE | ||
bce77161d3ea252c38a6bc429b7b7f08 *NEWS.md | ||
d514a375879150aaa754524c707f3120 *R/palettes.R | ||
6193cf425cf4f497ebdbe7c38c713857 *R/summary.R | ||
00341b6226b2e8f49b605c11ffd007b2 *R/themes.R | ||
e78e86cec5f8eff430dd4d1d692cda65 *R/summary.R | ||
46820901c9359e3c32b9f0c391d14989 *R/themes.R | ||
b54a9c6bb1ad01c193cb310894737908 *R/utils-docs.R | ||
c4045648bf2b8f5c25bde6b11fbe09f8 *R/utils.R | ||
c515940a0607ada359c4899255f1434f *R/zzz.R | ||
3b317558f7de67c3dac752af4125205b *R/zzz_data.R | ||
87f7d3538bfb305dff87d11dc5788789 *R/utils.R | ||
7845ce67e09447e07ab7c60eb6c91a27 *R/zzz.R | ||
c97d845628a5dd3892ae291849212ec7 *R/zzz_data.R | ||
72876005ed82662e299d737aa8d8967a *build/vignette.rds | ||
aac602f1c98de02b008f1ad985c39d80 *inst/WORDLIST | ||
ae4fe8f714cb3bb1ecc4c376701a4dcf *man/palette_lgbtq.Rd | ||
a45957995d18e08351c7248c68936475 *man/roxygen/templates/name.R | ||
75731936cf31d8b4f0f8fb890f0acf40 *man/show_pride.Rd | ||
7ac4799f0ad741cd13a5fe347254cbcb *man/theme_lgbtq.Rd | ||
6d045301088f527473dd67cf50db7120 *inst/doc/gallery.R | ||
6b02e628dccf6fd1eb77f79dbd4227b0 *inst/doc/gallery.Rmd | ||
99e6f84b8d915b544e47b560799d24cf *inst/doc/gallery.html | ||
89885693413847e1041f23ce8085355c *inst/doc/palette_history.R | ||
f0330d55b18e7c98068ae6a2d1b30975 *inst/doc/palette_history.Rmd | ||
bbccfb8b98db4a3159b46391214fb285 *inst/doc/palette_history.html | ||
b3ae5b8429f1998ebadee13311223f89 *man/palette_lgbtq.Rd | ||
0c6ae0c85796de909a5470ce414d82bb *man/roxygen/templates/name.R | ||
f32644214988221145a27ff4c6ed712d *man/show_pride.Rd | ||
6acf40434e3c923bd72eb382373c1d6f *man/theme_lgbtq.Rd | ||
332173f20d20942c02019350ea4dcadc *tests/spelling.R | ||
a4aef5431209f47ce8487f4f6e9cda15 *tests/testthat.R | ||
227b2a6f06642c2f7041a59f59707ee3 *tests/testthat/test-palettes.R | ||
439f5dc17e2b86c687957797dd03b856 *tests/testthat/test-summary.R | ||
41d36fe309cd5964501e3bd84389ebbb *tests/testthat/test-themes.R | ||
46349e2359fcba7a7bf6902bf1f5d29d *tests/testthat.R | ||
fd22651f54c8e3a3eb35bfaa80573728 *tests/testthat/test-palettes.R | ||
4d527e4ae7f18865db291383bf97d58e *tests/testthat/test-summary.R | ||
f7ca981cd8976bc22b682740c1a8c8c0 *tests/testthat/test-themes.R | ||
6b02e628dccf6fd1eb77f79dbd4227b0 *vignettes/gallery.Rmd | ||
f0330d55b18e7c98068ae6a2d1b30975 *vignettes/palette_history.Rmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
S3method(print,lgbtq_palette) | ||
export(palette_lgbtq) | ||
export(show_pride) | ||
export(theme_lgbtq) | ||
importFrom(ggplot2,element_line) | ||
importFrom(ggplot2,element_rect) | ||
importFrom(ggplot2,rel) | ||
importFrom(ggplot2,theme) | ||
importFrom(grDevices,rgb) | ||
importFrom(graphics,image) | ||
importFrom(graphics,par) | ||
importFrom(graphics,rect) | ||
importFrom(graphics,text) | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
S3method(print,lgbtq_palette) | ||
export(palette_lgbtq) | ||
export(show_pride) | ||
export(theme_lgbtq) | ||
importFrom(ggplot2,element_line) | ||
importFrom(ggplot2,element_rect) | ||
importFrom(ggplot2,rel) | ||
importFrom(ggplot2,theme) | ||
importFrom(grDevices,rgb) | ||
importFrom(graphics,image) | ||
importFrom(graphics,par) | ||
importFrom(graphics,rect) | ||
importFrom(graphics,text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
#' List available palettes | ||
#' | ||
#' @description Shows the names of available LGBTQ palettes and their metadata. | ||
#' | ||
#' @return A `data.frame` with palette names and numbers of colors. | ||
#' | ||
#' @examples | ||
#' show_pride() | ||
#' | ||
#' @export | ||
show_pride <- function() { | ||
data.frame( | ||
palettes = names(pride_data), | ||
lengths = vapply(pride_data, function(p) length(p[["colors"]]), | ||
integer(1), USE.NAMES = FALSE), | ||
stringsAsFactors = FALSE | ||
) | ||
} | ||
#' List available palettes | ||
#' | ||
#' @description Shows the names of available LGBTQ palettes and their metadata. | ||
#' | ||
#' @return A `data.frame` with palette names and numbers of colors. | ||
#' | ||
#' @examples | ||
#' show_pride() | ||
#' | ||
#' @export | ||
show_pride <- function() { | ||
data.frame( | ||
palettes = names(pride_data), | ||
lengths = vapply(pride_data, function(p) length(p[["colors"]]), | ||
integer(1), USE.NAMES = FALSE), | ||
stringsAsFactors = FALSE | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
extract_colors <- function(palette) { | ||
pride_data[[palette]][["colors"]] | ||
} | ||
|
||
extract_theme <- function(palette) { | ||
pride_data[[palette]][["theme"]] %||% theme_lgbtq_default | ||
} | ||
|
||
`%||%` <- function(object, default) { | ||
if (is.null(object)) default else object | ||
} | ||
extract_colors <- function(palette) { | ||
pride_data[[palette]][["colors"]] | ||
} | ||
|
||
extract_theme <- function(palette) { | ||
pride_data[[palette]][["theme"]] %||% theme_lgbtq_default | ||
} | ||
|
||
`%||%` <- function(object, default) { | ||
if (is.null(object)) default else object | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
.onLoad <- function(libname, pkgname) { | ||
prev_options <- options() | ||
|
||
new_options <- list( | ||
gglgbtq_bg = "white", | ||
gglgbtq_font_size = 2.5 | ||
) | ||
|
||
unset_inds <- !(names(new_options) %in% names(prev_options)) | ||
if (any(unset_inds)) { | ||
options(new_options[unset_inds]) | ||
} | ||
|
||
invisible() | ||
} | ||
.onLoad <- function(libname, pkgname) { | ||
prev_options <- options() | ||
|
||
new_options <- list( | ||
gglgbtq_bg = "white", | ||
gglgbtq_font_size = 2.5 | ||
) | ||
|
||
unset_inds <- !(names(new_options) %in% names(prev_options)) | ||
if (any(unset_inds)) { | ||
options(new_options[unset_inds]) | ||
} | ||
|
||
invisible() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
## ---- include = FALSE--------------------------------------------------------- | ||
knitr::opts_chunk$set( | ||
collapse = TRUE, | ||
comment = "#>", | ||
fig.height = 1.6, | ||
fig.width = 5 | ||
) | ||
library(gglgbtq) | ||
options(gglgbtq_font_size = 1.7) | ||
|
||
## ----rainbow------------------------------------------------------------------ | ||
palette_lgbtq("rainbow") | ||
|
||
## ----lesbian------------------------------------------------------------------ | ||
palette_lgbtq("lesbian") | ||
|
||
## ----gay---------------------------------------------------------------------- | ||
palette_lgbtq("gay") | ||
|
||
## ----bisexual----------------------------------------------------------------- | ||
palette_lgbtq("bisexual") | ||
|
||
## ----transgender-------------------------------------------------------------- | ||
palette_lgbtq("transgender") | ||
|
||
## ----asexual------------------------------------------------------------------ | ||
palette_lgbtq("asexual") | ||
|
||
## ----intersex----------------------------------------------------------------- | ||
palette_lgbtq("intersex") | ||
|
||
## ----nonbinary---------------------------------------------------------------- | ||
palette_lgbtq("nonbinary") | ||
|
||
## ----philadelphia------------------------------------------------------------- | ||
palette_lgbtq("philadelphia") | ||
|
||
## ----progress----------------------------------------------------------------- | ||
palette_lgbtq("progress") | ||
|
||
## ----aromantic---------------------------------------------------------------- | ||
palette_lgbtq("aromantic") | ||
|
||
## ----alloace------------------------------------------------------------------ | ||
palette_lgbtq("alloace") | ||
|
||
## ----aroallo------------------------------------------------------------------ | ||
palette_lgbtq("aroallo") | ||
|
||
## ----pansexual---------------------------------------------------------------- | ||
palette_lgbtq("pansexual") | ||
|
||
## ----lesbian_7---------------------------------------------------------------- | ||
palette_lgbtq("lesbian_7") | ||
|
||
## ----gay_7-------------------------------------------------------------------- | ||
palette_lgbtq("gay_7") | ||
|
||
## ----demiboy------------------------------------------------------------------ | ||
palette_lgbtq("demiboy") | ||
|
||
## ----demigirl----------------------------------------------------------------- | ||
palette_lgbtq("demigirl") | ||
|
||
## ----genderfluid-------------------------------------------------------------- | ||
palette_lgbtq("genderfluid") | ||
|
||
## ----genderqueer-------------------------------------------------------------- | ||
palette_lgbtq("genderqueer") | ||
|
||
## ----agender------------------------------------------------------------------ | ||
palette_lgbtq("agender") | ||
|
||
## ----bigender----------------------------------------------------------------- | ||
palette_lgbtq("bigender") | ||
|
Oops, something went wrong.