Skip to content

Commit

Permalink
set getOption("stringsAsFactors") to FALSE by default (required b…
Browse files Browse the repository at this point in the history
…y R-devel)
  • Loading branch information
briatte committed Mar 6, 2023
1 parent 8145424 commit 5b6ed24
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 59 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Package: ggnetwork
Type: Package
Title: Geometries to Plot Networks with 'ggplot2'
Description: Geometries to plot network objects with 'ggplot2'.
Version: 0.5.10
Date: 2021-07-05
Version: 0.5.12
Date: 2023-03-06
Maintainer: François Briatte <f.briatte@gmail.com>
Authors@R: c(
person("François", "Briatte", email = "f.briatte@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6494-9774")),
Expand Down Expand Up @@ -38,7 +38,7 @@ Collate:
'geom-edges.R'
'ggnetwork.R'
VignetteBuilder: knitr
RoxygenNote: 7.1.1
RoxygenNote: 7.2.1
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
NeedsCompilation: no
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
ggnetwork 0.5.12 (2023-03-06)
=============================

## Minor improvements and fixes

* Fortifying graph objects now assumes that `getOption("stringsAsFactors")` is to be set to `FALSE` when it is missing (required by a recent change in R-devel).

ggnetwork 0.5.11 (2021-07-06)
=============================

## Repository changes

* Replaced Travis CI with GitHub Actions (#66).
* Started using [`renv`](https://rstudio.github.io/renv/articles/renv.html) for [that purpose](https://rstudio.github.io/renv/articles/ci.html).

ggnetwork 0.5.10 (2021-07-05)
=============================
Expand Down
2 changes: 1 addition & 1 deletion R/fortify-igraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fortify.igraph <- function(
arrow.gap = ifelse(igraph::is.directed(model), 0.025, 0),
by = NULL,
scale = TRUE,
stringsAsFactors = getOption("stringsAsFactors"),
stringsAsFactors = getOption("stringsAsFactors", FALSE),
...
) {
# node placement
Expand Down
2 changes: 1 addition & 1 deletion R/fortify-network.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fortify.network <- function(
arrow.gap = ifelse(network::is.directed(model), 0.025, 0),
by = NULL,
scale = TRUE,
stringsAsFactors = getOption("stringsAsFactors"),
stringsAsFactors = getOption("stringsAsFactors", FALSE),
...
) {
# node placement
Expand Down
6 changes: 3 additions & 3 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ NULL
#' meaningful spatial coordinates, such as latitude and longitude.
#' @param stringsAsFactors whether vertex and edge attributes should be
#' converted to factors if they are of class \code{character}. Defaults to
#' the value of \code{getOption("stringsAsFactors")}, which is \code{TRUE} by
#' default: see \code{\link[base]{data.frame}}.
#' the value of \code{getOption("stringsAsFactors")}, which is \code{FALSE}
#' by default: see \code{\link[base]{data.frame}}.
#' @param .list_vertex_attributes_fun a "list vertex attributes" function.
#' @param .get_vertex_attributes_fun a "get vertex attributes" function.
#' @param .list_edges_attributes_fun a "get edges attributes" function.
Expand All @@ -129,7 +129,7 @@ format_fortify <- function(
arrow.gap = ifelse(network::is.directed(model), 0.025, 0),
by = NULL,
scale = TRUE,
stringsAsFactors = getOption("stringsAsFactors"),
stringsAsFactors = getOption("stringsAsFactors", FALSE),
.list_vertex_attributes_fun = NULL,
.get_vertex_attributes_fun = NULL,
.list_edges_attributes_fun = NULL,
Expand Down
6 changes: 3 additions & 3 deletions man/format_fortify.Rd

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

6 changes: 3 additions & 3 deletions man/fortify.igraph.Rd

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

6 changes: 3 additions & 3 deletions man/fortify.network.Rd

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

16 changes: 9 additions & 7 deletions man/geom_edges.Rd

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

14 changes: 5 additions & 9 deletions man/geom_edgetext.Rd

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

6 changes: 1 addition & 5 deletions man/geom_edgetext_repel.Rd

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

14 changes: 8 additions & 6 deletions man/geom_nodes.Rd

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

14 changes: 5 additions & 9 deletions man/geom_nodetext.Rd

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

6 changes: 1 addition & 5 deletions man/geom_nodetext_repel.Rd

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

Binary file removed tests/testthat/testthat-problems.rds
Binary file not shown.

0 comments on commit 5b6ed24

Please sign in to comment.