Closed nanxstats closed 1 year ago
Could you show me the line of code? I did not see return()
function in print.meta_adam()
@fb-elong Perhaps the the link I pasted was not accurately anchored because it's the latter half of the section, but here is the the exact quote:
If your function is called primarily for its side-effects (like printing, plotting, or saving to disk), it should return the first argument invisibly. This makes it possible to use the function as part of a pipe. print methods should usually do this, like this example from httr:
print.url <- function(x, ...) {
cat("Url: ", build_url(x), "\n", sep = "")
invisible(x)
}
Got it. Would you want to create a PR?
See https://style.tidyverse.org/functions.html?q=invisible#return for the rationale.
In particular,
print.meta_adam()
.Probably in the next release.