Skip to content

Commit

Permalink
Merge pull request #3 from pepijn-devries/work-in-progress
Browse files Browse the repository at this point in the history
Additional fixes for CRAN checks
  • Loading branch information
pepijn-devries authored Feb 26, 2024
2 parents 5f1db69 + 401699b commit 949f4ea
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ggfields
Title: Add Vector Field Layers to Ggplots
Version: 0.0.5
Date: 2024-02-25
Version: 0.0.6
Date: 2024-02-26
Authors@R: c(person("Pepijn", "de Vries", role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-7961-6646")))
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ggfields v0.0.5 (Release date: 2024-02-25)
ggfields v0.0.6 (Release date: 2024-02-26)
-------------

* Some tweaks to `pkgdown` website
Expand Down
27 changes: 17 additions & 10 deletions R/angle_correction.r
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@
#'
#' ## Create a mockup of ggplot params. Normally this is handled automatically by ggplot2
#' params_mockup <-
#' list(
#' x_range = range(d$x),
#' y_range = range(d$y),
#' crs = sf::st_crs(4326)
#' c(
#' ggplot2::ggplot() + geom_fields(),
#' list(
#' x_range = range(d$x),
#' y_range = range(d$y),
#' crs = sf::st_crs(4326),
#' default_crs = 4326
#' )
#' )
#'
#' ## When plotting as lon-lat, the angle correction will be zero
Expand All @@ -42,12 +46,15 @@
#'
#' ## Again get parameter mockup values
#' params_mockup2 <-
#' list(
#' x_range = range(sf::st_coordinates(d2)[,1]),
#' y_range = range(sf::st_coordinates(d2)[,1]),
#' crs = sf::st_crs(32631)
#' )
#'
#' c(
#' ggplot2::ggplot() + geom_fields(),
#' list(
#' x_range = range(sf::st_coordinates(d2)[,1]),
#' y_range = range(sf::st_coordinates(d2)[,1]),
#' crs = sf::st_crs(32631),
#' default_crs = 4326
#' )
#' )
#' ## in UTM projection in this area (which is slightly tilted) the correction is
#' ## larger than zero
#' angle_correction(d2, params_mockup2,
Expand Down
27 changes: 17 additions & 10 deletions man/angle_correction.Rd

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

0 comments on commit 949f4ea

Please sign in to comment.