Jon Stearley wrote:
On Jun 1, 2005, at 10:23 AM, Rolf Turner wrote:
foo<-function(x,f) { sink(f); print(format(x)); sink(); }
many thanks! doh ;)
?format is unclear on return value imho.
?format does describe the return value, though in the Details section
rather than in Value:
These functions convert their first argument to a vector (or
array) of character strings which have a common format (as is done
by 'print'), fulfilling 'length(format*(x, *)) == length(x)'. The
trimming with 'trim = TRUE' is useful when the strings are to be
used for plot 'axis' annotation.
I'll try to make it clearer.
Duncan Murdoch
______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html