Преглед изворни кода

Fix indents and invisible characters (GitHub Actions)

pull/81/head
gadenbuie пре 1 година
родитељ
комит
3f22b3822a
5 измењених фајлова са 7 додато и 11 уклоњено
  1. +0
    -1
      R/ggplot2.R
  2. +0
    -1
      tests/testthat/test-helpers.R
  3. +0
    -1
      tests/testthat/test-style_xaringan.R
  4. +0
    -1
      tests/testthat/test-themes.R
  5. +7
    -7
      vignettes/ggplot2-themes.Rmd

+ 0
- 1
R/ggplot2.R Прегледај датотеку


#' A Plot Theme for ggplot2 by xaringanthemer #' A Plot Theme for ggplot2 by xaringanthemer
#' #'
#' @description #' @description

+ 0
- 1
tests/testthat/test-helpers.R Прегледај датотеку


test_that("element_description", { test_that("element_description", {
text_in <- c("multiple", NA, "", ".remark-slide-content", "h1", "pre, code") text_in <- c("multiple", NA, "", ".remark-slide-content", "h1", "pre, code")
text_out <- c( text_out <- c(

+ 0
- 1
tests/testthat/test-style_xaringan.R Прегледај датотеку


test_that("style_xaringan() writes to specified outfile", { test_that("style_xaringan() writes to specified outfile", {
tmpfile <- tempfile(fileext = ".css") tmpfile <- tempfile(fileext = ".css")
expect_equal(style_xaringan(outfile = tmpfile), tmpfile) expect_equal(style_xaringan(outfile = tmpfile), tmpfile)

+ 0
- 1
tests/testthat/test-themes.R Прегледај датотеку


test_theme_file <- function(theme = "duo", theme_file = paste0(theme, ".css"), ...) { test_theme_file <- function(theme = "duo", theme_file = paste0(theme, ".css"), ...) {
local_edition(2) local_edition(2)
on.exit(local_edition(3)) on.exit(local_edition(3))

+ 7
- 7
vignettes/ggplot2-themes.Rmd Прегледај датотеку

collapse = TRUE, collapse = TRUE,
warning = FALSE, warning = FALSE,
comment = "#>", comment = "#>",
fig.width = 6,
fig.width = 6,
fig.height = 4 fig.height = 4
) )
``` ```
```{r ggplot2-demo-1, out.width = "48%", fig.show="hide"} ```{r ggplot2-demo-1, out.width = "48%", fig.show="hide"}
library(ggplot2) library(ggplot2)


g_base <- ggplot(mpg) +
aes(hwy, cty) +
g_base <- ggplot(mpg) +
aes(hwy, cty) +
geom_point() + geom_point() +
labs(x = "Highway MPG", y = "City MPG", title = "Fuel Efficiency") labs(x = "Highway MPG", y = "City MPG", title = "Fuel Efficiency")


- `header_font_google = google_font("Oleo Script")`. - `header_font_google = google_font("Oleo Script")`.


```{r text demo, fig.width = 10} ```{r text demo, fig.width = 10}
g_diamonds_with_text <-
g_diamonds +
g_diamonds_with_text <-
g_diamonds +
geom_text(aes(y = ..count.., label = format(..count.., big.mark = ",")), geom_text(aes(y = ..count.., label = format(..count.., big.mark = ",")),
vjust = -0.30, size = 8, stat = "count") +
vjust = -0.30, size = 8, stat = "count") +
labs(x = "Cut", y = "Count") labs(x = "Cut", y = "Count")


g_diamonds_with_text + theme_xaringan() g_diamonds_with_text + theme_xaringan()
```{r eval=FALSE} ```{r eval=FALSE}
font_url <- file.path( font_url <- file.path(
"https://fontlibrary.org/assets/fonts/glacial-indifference/", "https://fontlibrary.org/assets/fonts/glacial-indifference/",
"5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982",
"5f2cf277506e19ec77729122f27b1faf/0820b3c58fed35de298219f314635982",
"GlacialIndifferenceRegular.ttf" "GlacialIndifferenceRegular.ttf"
) )



Loading…
Откажи
Сачувај