Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Size of string in message function in R

There seems to be a limit on the size of the string used in message. The following only prints until number 1859 (Using R v3.1.3 on 64 bit Win7 machine)

message(paste(seq(1,2000),collapse = "-"))

while

cat(paste(seq(1,2000),collapse = "-"))

prints it all. Is this a bug?

like image 858
Relund Avatar asked May 21 '15 10:05

Relund


1 Answers

There's a good solution in this question:

avoid string printed to console getting truncated (in RStudio)

As it suggests, if you're using RStudio, just go to Global Options -> Code -> Display -> Limit length of lines displayed in the console to:

And change the value to zero. It works for me.

like image 189
Wencheng Lau-Medrano Avatar answered Oct 02 '22 17:10

Wencheng Lau-Medrano