Well,...
cat() is as Jeff describes.
However, print() is a generic function (see ?UseMethod) for which
there are literally hundreds of different methods that may do far
more/different than merely output character strings. For example, the
print method for trellis objects, print.trellis, draws a
Please stop posting html email per the Posting Guide. You are only going to
reduce the chance of successfully communicating your questions to experienced
users on this list.
Re cat vs print: the purpose of print is to show values much as they are
entered in source code, so quotes and escaped
Since both *cat * as well as * print * create a character vector for
outputing on the screen. Still both give different results as apparant
below. My query is why so ?
> cat(10)
10
> print(10)
[1] 10
Why is the [1] of index number missing in case of *cat *?
Thanks
Ramnik
[[alternative
3 matches
Mail list logo