luukvdmeer / sfnetworks

Tidy Geospatial Networks in R
https://luukvdmeer.github.io/sfnetworks/
Other
334 stars 20 forks source link

The print methods should return x invisibly #217

Closed agila5 closed 1 year ago

agila5 commented 2 years ago

Is your feature request related to a problem? Please describe. The generic print() states the following

print prints its argument and returns it invisibly (via invisible). It is a generic function which means that new printing methods can be easily added for new classes.

Therefore, I think that print.sfnetworks

https://github.com/luukvdmeer/sfnetworks/blob/43ecad6c9823cfb5ea746a3dc44a1fe4095230c8/R/sfnetwork.R#L370-L371

and print.morphed_sfnetwork

https://github.com/luukvdmeer/sfnetworks/blob/43ecad6c9823cfb5ea746a3dc44a1fe4095230c8/R/sfnetwork.R#L445-L446

should terminate with invisible(x).

Describe the solution you'd like Just add invisible(x) at the end of those methods.

Describe alternatives you've considered Ignore the problem :sweat_smile:

luukvdmeer commented 1 year ago

Fixed in v0.6.0