Miguel Porto wrote: > > Hmm... do something like that, no need to change the global option (I used > a > named vector instead of a list, it's more convenient): > > eg <- function(x, digits=4) { > xbar <- mean(x) > sdx <- sd(x) > value <- c(xbar, sdx) > names(value) <- c("Mean of X", "SD of X") > print(round(value,digits)); > return(invisible(value))} > >
Would be ok, but Josh explicitly had no print in the function, so one could assume that he wanted full control. Dieter -- View this message in context: http://n4.nabble.com/Return-one-value-print-another-tp1590248p1590563.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.