Kaynağa Gözat

Fix a few rcmd check issues

tags/v0.3.0
Garrick Aden-Buie 6 yıl önce
ebeveyn
işleme
6ddb81e9c1
3 değiştirilmiş dosya ile 11 ekleme ve 5 silme
  1. +2
    -0
      DESCRIPTION
  2. +8
    -4
      R/ggplot2.R
  3. +1
    -1
      R/style_extra_css.R

+ 2
- 0
DESCRIPTION Dosyayı Görüntüle

Imports: Imports:
colorspace, colorspace,
glue, glue,
methods,
purrr, purrr,
tibble, tibble,
utils, utils,
here, here,
knitr, knitr,
rmarkdown, rmarkdown,
scales,
showtext, showtext,
sysfonts, sysfonts,
testthat (>= 2.1.0), testthat (>= 2.1.0),

+ 8
- 4
R/ggplot2.R Dosyayı Görüntüle

axis.title = ggplot2::element_text(size = title_font_size * 0.8), axis.title = ggplot2::element_text(size = title_font_size * 0.8),
axis.ticks = ggplot2::element_line(color = blend(0.8)), axis.ticks = ggplot2::element_line(color = blend(0.8)),
axis.text = ggplot2::element_text(color = blend(0.4)), axis.text = ggplot2::element_text(color = blend(0.4)),
legend.key = element_rect(fill = "transparent", colour = NA),
legend.key = ggplot2::element_rect(fill = "transparent", colour = NA),
plot.caption = ggplot2::element_text( plot.caption = ggplot2::element_text(
size = text_font_size * 0.8, size = text_font_size * 0.8,
color = blend(0.3) color = blend(0.3)
"sf" = list(color = text_color) "sf" = list(color = text_color)
) )


geom_names <- setNames(nm = names(xaringan_theme_defaults))
geom_names <- purrr::set_names(names(xaringan_theme_defaults))


previous_defaults <- lapply( previous_defaults <- lapply(
geom_names, geom_names,


restore_default <- utils::modifyList(xaringanthemer_env$std_ggplot_defaults, old_default) restore_default <- utils::modifyList(xaringanthemer_env$std_ggplot_defaults, old_default)


geom_names <- setNames(nm = names(restore_default))
geom_names <- purrr::set_names(names(restore_default))
previous_defaults <- lapply( previous_defaults <- lapply(
geom_names, geom_names,
function(geom) safely_set_geom(geom, restore_default[[geom]]) function(geom) safely_set_geom(geom, restore_default[[geom]])
direction = 1, direction = 1,
inverse = FALSE inverse = FALSE
) { ) {
requires_package("ggplot2", "scale_xaringan_discrete")

aes_type <- match.arg(aes_type) aes_type <- match.arg(aes_type)
color <- hex2HCL(get_theme_accent_color(color, inverse)) color <- hex2HCL(get_theme_accent_color(color, inverse))


end = 1, end = 1,
inverse = FALSE inverse = FALSE
) { ) {
requires_package("ggplot2", "scale_xaringan_continuous")
requires_package("scales", "scale_xaringan_continuous")
aes_type <- match.arg(aes_type) aes_type <- match.arg(aes_type)
color <- hex2HCL(get_theme_accent_color(color, inverse)) color <- hex2HCL(get_theme_accent_color(color, inverse))


color_blender <- function(x, y) function(alpha = 0.5) blend_colors(x, y, alpha) color_blender <- function(x, y) function(alpha = 0.5) blend_colors(x, y, alpha)


hex2HCL <- function(x) { hex2HCL <- function(x) {
colorspace::coords(as(colorspace::hex2RGB(x), "polarLUV"))
colorspace::coords(methods::as(colorspace::hex2RGB(x), "polarLUV"))
} }





+ 1
- 1
R/style_extra_css.R Dosyayı Görüntüle

} }
} }
child_unnamed <- purrr::map_lgl(purrr::map(css, ~ { child_unnamed <- purrr::map_lgl(purrr::map(css, ~ {
is.null(names(.)) || names(.) == ""
is.null(names(.)) || any(names(.) == "")
}), ~ any(.)) }), ~ any(.))
if (any(child_unnamed)) { if (any(child_unnamed)) {
has_unnamed <- names(css)[child_unnamed] has_unnamed <- names(css)[child_unnamed]

Yükleniyor…
İptal
Kaydet