Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ggtibble
Title: Create Tibbles and Lists of 'ggplot' Figures for Reporting
Version: 1.0.1.9000
Version: 1.0.2
Authors@R:
person("Bill", "Denney", email="wdenney@humanpredictions.com", role=c("aut", "cre"), comment=c(ORCID="0000-0002-5759-428X"))
Description:
Expand Down Expand Up @@ -30,7 +30,7 @@ Imports:
tibble,
tidyr,
vctrs
URL: https://billdenney.github.io/ggtibble/, https://github.com/billdenney/ggtibble
BugReports: https://github.com/billdenney/ggtibble/issues
URL: https://humanpred.github.io/ggtibble/, https://github.com/humanpred/ggtibble
BugReports: https://github.com/humanpred/ggtibble/issues
Language: en-US
VignetteBuilder: knitr
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ggtibble 1.0.1.9000
# ggtibble 1.0.2

* `ggtibble()` now warns if `outercols` are not used in either the `caption` or
the `labs` argument (#13).
Expand All @@ -9,6 +9,7 @@
objects (#23).
* `ggsave()` can accept a character vector of all filenames to use when saving
(#25).
* Update testing to work with ggplot2 version 4.0.0

# ggtibble 1.0.1

Expand Down
2 changes: 1 addition & 1 deletion R/ggsave.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#' @inheritParams ggplot2::ggsave
#' @export
ggsave <- function(filename,
plot = last_plot(),
plot = ggplot2::last_plot(),
device = NULL,
path = NULL,
scale = 1,
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# ggtibble

<!-- badges: start -->
[![R-CMD-check](https://github.com/billdenney/ggtibble/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/billdenney/ggtibble/actions/workflows/R-CMD-check.yaml)
[![R-CMD-check](https://github.com/humanpred/ggtibble/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/humanpred/ggtibble/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/ggtibble)](https://CRAN.R-project.org/package=ggtibble)
[![Codecov test coverage](https://codecov.io/gh/billdenney/ggtibble/branch/main/graph/badge.svg)](https://app.codecov.io/gh/billdenney/ggtibble?branch=main)
[![Codecov test coverage](https://codecov.io/gh/humanpred/ggtibble/branch/main/graph/badge.svg)](https://app.codecov.io/gh/humanpred/ggtibble?branch=main)
<!-- badges: end -->

The goal of `ggtibble` is to allow creation of similarly-formatted figures as
Expand All @@ -18,7 +18,7 @@ You can install the development version of `ggtibble` from

``` r
# install.packages("devtools")
devtools::install_github("billdenney/ggtibble")
devtools::install_github("humanpred/ggtibble")
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: https://billdenney.github.io/ggtibble/
url: https://humanpred.github.io/ggtibble/
template:
bootstrap: 5

11 changes: 10 additions & 1 deletion inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
CMD
Codecov
Tibbles
bmp
colour
eps
geoms
gg
gglist
ggplot
ggplots
px
jpeg
pictex
png
ps
sprintf
svg
tex
tibble
tibbles
wmf
5 changes: 3 additions & 2 deletions man/ggsave.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-gglist.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test_that("vec_arith for gglists", {

test_that("new_gglist accepted input classes", {
expect_s3_class(
new_gglist(list(ggplot2::labs("foo"))),
new_gglist(list(ggplot2::labs(x = "foo"))),
"gglist"
)
expect_s3_class(
Expand Down
24 changes: 24 additions & 0 deletions tests/testthat/test-ggsave.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,27 @@ test_that("ggsave with all filenames specified (#25)", {
fixed = TRUE
)
})

test_that("ggsave.default", {
d_plot <-
data.frame(
A = rep(c("foo", "bar"), each = 4),
B = 1:8,
C = 11:18,
Bunit = "mg",
Cunit = "km"
)
current_plots <-
ggplot2::ggplot(
d_plot,
ggplot2::aes(x = B, y = C)
) +
ggplot2::geom_point() +
ggplot2::geom_line()
expected_file <- file.path(tempdir(), "foo.png")
expect_equal(
ggsave(filename = "foo.png", plot = current_plots, path = tempdir()),
expected_file
)
unlink(expected_file)
})