On 18/01/2009, at 7:55 PM, Pedro Mardones wrote:
Dear all; I have a function written in R that returns as a list of values as output that has associated some user defined attributes to it. How can hide these attributes when printing the output on screen? I'm using R-2.8.1 on WinXP....it's like hiding the attr of the output from the scale function.... Thanks in advance
I think that the only way that you can accomplish this ``in a general way''
is to assign a new class (e.g. ``foo'') to the object returned by your function and then write a new print method, print.foo(). Something like print.foo <- function(x,...) { attributes(x) <- NULL print(x) } HTH cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ______________________________________________ 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.