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

The print methods should return x invisibly #217

Closed
agila5 opened this issue Jun 28, 2022 · 1 comment
Closed

The print methods should return x invisibly #217

agila5 opened this issue Jun 28, 2022 · 1 comment

Comments

@agila5
Copy link
Collaborator

agila5 commented Jun 28, 2022

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

sfnetworks/R/sfnetwork.R

Lines 370 to 371 in 43ecad6

print.sfnetwork = function(x, ...) {
# Define active and inactive component.

and print.morphed_sfnetwork

sfnetworks/R/sfnetwork.R

Lines 445 to 446 in 43ecad6

print.morphed_sfnetwork = function(x, ...) {
x_tbg = structure(x, class = setdiff(class(x), "morphed_sfnetwork"))

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 😅

@luukvdmeer
Copy link
Owner

Fixed in v0.6.0

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

No branches or pull requests

2 participants