David -- Ah! Excellent. OK, that explains Dennis's function's output. Print(str(X)) evaluates str(X), sending the usual str() output to the console as a side effect, and then prints what str() returns, which is NULL. And invisible() prints NULL again, but we don't see NULL NULL, because the second one is invisible.
Still puzzled by the order of my output, though. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Using-str-in-a-function-tp3655785p3666543.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.