Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message argument to sfnetwork() #263

Closed
wants to merge 1 commit into from
Closed

Add message argument to sfnetwork() #263

wants to merge 1 commit into from

Conversation

agila5
Copy link
Collaborator

@agila5 agila5 commented Dec 14, 2023

The message argument can be used to silence the messages that are printed when checking the network validity:

library(sf)
#> Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
library(sfnetworks)

p1 = st_point(c(7, 51))
p2 = st_point(c(7, 52))
l1 = st_sfc(st_linestring(c(p1, p2)))

edges = st_as_sf(l1, crs = 4326)
nodes = st_as_sf(c(st_sfc(p1), st_sfc(p2)), crs = 4326)
edges$from = c(1)
edges$to = c(2)

sfn <- sfnetwork(nodes, edges)
#> Checking if spatial network structure is valid...
#> Spatial network structure is valid
sfn <- sfnetwork(nodes, edges, message = FALSE)

Created on 2023-12-14 with reprex v2.0.2

Ref #261

(btw: I'm not sure why Rstudio decided to change the indentation in some paragraphs... Moreover, feel free to rename the new argument as quiet or something else).

The message argument can be used to silence the messages that are printed when checking the network validity.

Ref #261
Base automatically changed from develop to main April 9, 2024 11:56
@luukvdmeer
Copy link
Owner

This is added to the new minor version, thanks! 6a15113

@luukvdmeer luukvdmeer closed this Apr 9, 2024
@luukvdmeer luukvdmeer deleted the sfn_message branch December 9, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants