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 characters such as "\n" are 
shown. Cat is intended to provide a way to send characters straight to the 
console so the effects of special characters can be visible (i.e. getting text 
on the next line when a "\n" occurs in a string). Thus the element numbering is 
not relevant there.
-- 
Sent from my phone. Please excuse my brevity.

On April 17, 2017 12:18:36 AM PDT, Data MagicPro <datamagicpro2...@gmail.com> 
wrote:
>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 HTML version deleted]]
>
>______________________________________________
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to