Skip to content
Prev 390924 / 398506 Next

copying huge strings via clipboard?

Hi,
This is on Windows10 via the R gui  .  I, admittedly inadvisably, tried 
to create a new character object by first copying a 1-million character 
string (including lead and trail "'" chars) to the clipboard and then, 
in the console,

 >> foo <-
and hitting "paste"

What I found is that, around 5000 characters, a newline ( "\n") char 
showed up.  Is this something that the Windows Clipboard does, or 
something odd about pasting into a command in R?

Postscript:  using

 >>  bar <- readChar('thefile.txt',1e6)

the import works perfectly.