Skip to content

Commit

Permalink
A few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Jan 16, 2024
1 parent f3337a9 commit b064393
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 9 deletions.
4 changes: 2 additions & 2 deletions R/buffer.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion R/dijkstra.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
54 changes: 54 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion man/dijkstra-methods.Rd

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

2 changes: 1 addition & 1 deletion man/plot-gGraph.Rd

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

6 changes: 3 additions & 3 deletions vignettes/geograph.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit b064393

Please sign in to comment.