[R] Difference between console output of cat and print

Data MagicPro datamagicpro2017 at gmail.com
Mon Apr 17 09:18:36 CEST 2017

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)
> print(10)
[1] 10

Why is the [1] of index number missing in case of *cat *?


	[[alternative HTML version deleted]]

More information about the R-help mailing list