Thanks everyone for the suggestions. If the problem is caused by a restriction in one of the (software) components i'm using (OS, terminal etc), should the remaining of the pasted code simply be missing after the point where the error occurs? As can be seen from my example above the entire block of code is pasted and is executed by the R command line, although with errors from the point where the first error occured.
Can it be that the paste mechanism i'm using (from GEdit to GNOME terminal on Ubuntu Linux) is adding control characters between pasting multiple blocks of code and these (invisible) characters are causing the problem? Kind regards, -Mark- 2013/5/28 Prof Brian Ripley <rip...@stats.ox.ac.uk> > On 28/05/2013 10:44, Jim Lemon wrote: > >> On 05/28/2013 04:54 PM, Mark Breman wrote: >> >>> Hello List, >>> >>> When i paste a large block of R code from an editor to the R command line >>> the execution of the code will often fail at some point because it is not >>> pasted as it was copied. >>> ... >>> >> >> Hi Mark, >> I have encountered this problem, and it may be due to the following: >> >> Command lines entered at the console are limited to about 4095 bytes >> (not characters). >> > > It is not. That is a limit on line length. > > It is a limitation of cut-and-paste. That has limits depending on > > - the OS > - how it is done (e.g. X11, GNOME, OS X) ... most OSes have multiple > mechanisms, including Linux (which this was). > - where it is pasted from > - where it is pasted to. > > We were told this was Linux: the most likely limitation is the terminal > into which this was pasted. > > > From "An Introduction to R", included in the distribution. >> > > -- > Brian D. Ripley, rip...@stats.ox.ac.uk > Professor of Applied Statistics, > http://www.stats.ox.ac.uk/~**ripley/<http://www.stats.ox.ac.uk/~ripley/> > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.