From b06439364e13159dac0ffe5c26695519b30a9c6a Mon Sep 17 00:00:00 2001 From: Andrea Manica Date: Tue, 16 Jan 2024 17:15:08 +0000 Subject: [PATCH] A few more fixes --- R/buffer.R | 4 +-- R/dijkstra.R | 2 +- R/plot.R | 2 +- inst/WORDLIST | 54 +++++++++++++++++++++++++++++++++++++++++ man/dijkstra-methods.Rd | 2 +- man/plot-gGraph.Rd | 2 +- vignettes/geograph.Rmd | 6 ++--- 7 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 inst/WORDLIST diff --git a/R/buffer.R b/R/buffer.R index 40e94b8..121a663 100644 --- a/R/buffer.R +++ b/R/buffer.R @@ -178,12 +178,12 @@ setMethod("buffer", "gData", function(x, d, res.type = c("nodes", "gData", "gGra ## CALL UPON gGraph METHOD ## - if (res.type == "gGraph") { # if result seeked is gGraph + if (res.type == "gGraph") { # if result sought is gGraph res <- buffer(myGraph, myNodes, d, res.type = "gGraph") return(res) } - # if result seeked is nodes or gData + # if result sought is nodes or gData temp <- buffer(myGraph, myNodes, d, res.type = "nodes") if (res.type == "nodes") { return(temp) diff --git a/R/dijkstra.R b/R/dijkstra.R index 1b43990..db59eb6 100644 --- a/R/dijkstra.R +++ b/R/dijkstra.R @@ -18,7 +18,7 @@ #' that if the \code{gPath} does not contain pairwise information, a warning #' will be issued, but the resulting output will likely be meaningless.\cr #' -#' In 'dijkstraBetween', paths are seeked all possible pairs of nodes between +#' In 'dijkstraBetween', paths are sought all possible pairs of nodes between #' 'from' and 'to'. #' #' @name dijkstra-methods diff --git a/R/plot.R b/R/plot.R index 6b3fa26..33b5ce8 100644 --- a/R/plot.R +++ b/R/plot.R @@ -45,7 +45,7 @@ #' the maximum weight). #' @param col.rules a data.frame with two named columns, the first one giving #' values of a node attribute, and the second one stating colors to be used for -#' each value. If not provided, this is seeked from the \code{@meta\$color} +#' each value. If not provided, this is sought from the \code{@meta\$color} #' slot of the object. #' @param sticky.points a logical indicating if added points should be kept #' when replotting (TRUE), or not (FALSE). In any case, \code{reset=TRUE} will diff --git a/inst/WORDLIST b/inst/WORDLIST new file mode 100644 index 0000000..366cb67 --- /dev/null +++ b/inst/WORDLIST @@ -0,0 +1,54 @@ +Ababa +Addis +Baumgardner +CMD +GeoGraphic +HGDP +Heikes +Malaga +RBGL +RBGL's +Ringler +attr +closestNode +codecov +coords +dev +devtools +dijkstraBetween +dijkstraFrom +gData +gGraph +gPath +geo +geoGraphEnv +georeferenced +goto +graphNEL +hgdp +img +linux +magrittr +manpage +manpages +nb +rawgraph +rawgraph's +rawgraphs +replot +replotting +rnaturalearth +roxygen +specificities +subsettable +textit +th +uncrossable +worldgraph +worldgraph's +worldgraphs +xmax +xmin +xy +ymax +ymin diff --git a/man/dijkstra-methods.Rd b/man/dijkstra-methods.Rd index 8bcfac1..3685162 100644 --- a/man/dijkstra-methods.Rd +++ b/man/dijkstra-methods.Rd @@ -85,7 +85,7 @@ returned by \code{dijkstraBetween} and returns a \code{dist} object. Note that if the \code{gPath} does not contain pairwise information, a warning will be issued, but the resulting output will likely be meaningless.\cr -In 'dijkstraBetween', paths are seeked all possible pairs of nodes between +In 'dijkstraBetween', paths are sought all possible pairs of nodes between 'from' and 'to'. } \examples{ diff --git a/man/plot-gGraph.Rd b/man/plot-gGraph.Rd index f15cfc8..772967f 100644 --- a/man/plot-gGraph.Rd +++ b/man/plot-gGraph.Rd @@ -46,7 +46,7 @@ the maximum weight).} \item{col.rules}{a data.frame with two named columns, the first one giving values of a node attribute, and the second one stating colors to be used for -each value. If not provided, this is seeked from the \code{@meta\$color} +each value. If not provided, this is sought from the \code{@meta\$color} slot of the object.} \item{sticky.points}{a logical indicating if added points should be kept diff --git a/vignettes/geograph.Rmd b/vignettes/geograph.Rmd index c2f001c..9b8ae11 100644 --- a/vignettes/geograph.Rmd +++ b/vignettes/geograph.Rmd @@ -222,7 +222,7 @@ plotEdges(worldgraph.10k) This figure illustrates the matching of original locations (black crosses) to nodes of the grid (red circles). -As we can see, an issue occured for Bordeaux, which has been assigned to a node in the sea (in blue). +As we can see, an issue occurred for Bordeaux, which has been assigned to a node in the sea (in blue). Locations can be re-assigned to nodes with restrictions for some node attribute values using `closestNode`; for instance, here we constrain matching nodes to have an `habitat` value (defined as node attribute in `worldgraph.10k`) equaling `land` (green points): @@ -374,7 +374,7 @@ plotting area to the geographic extent of the dataset. To plot additional information, it can be useful to extract the spatial coordinates from the data. This is achieved by `getCoords`. This method takes an extra argument `original`, which is TRUE if original spatial coordinates -are seeked, or FALSE for coordinates of the nodes on the grid. +are sought, or FALSE for coordinates of the nodes on the grid. We can use this to represent, for instance, the population sizes for the different cities: ```{r cities_plot, fig=TRUE} transp <- function(col, alpha = .5) { @@ -522,7 +522,7 @@ represent geographic objects such as points and polygons. By default, *geoGraph* uses the package *rnaturalearth* to provide continent and country outlines, but it is possible also to load custom GIS shapefiles with `sf::st_read()`. -We start by loading country oultines for the whole world. Note that we +We start by loading country outlines for the whole world. Note that we turn off spherical trigonometry functions with `sf::sf_use_s2(FALSE)`, as the `naturalearth` dataset is not compatible with that functionality.