Re: [R] R BATCH problem

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 02 Jul 2004 - 02:15:46 EST


On Thu, 1 Jul 2004, Andreas Pauling wrote:

> Dear all
>
> Entering
>
> rows<-as.matrix(c(4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,300,304,308,312,316,320,324,328,332,336,340,344,348,352,356,360,364,368,372,376,380,384,388,392,396,400,404,408,412,416,420,424,428,432,436,440,444,448,452,456,460,464,468,472,476,480,484,488,492,496,500,504,508,512,516,520,524,528,532,536,540,544,548,552,556,560,564,568,572,576,580,584,588,592,596,600,604,608,612,616,620,624,628,632,636,640,644,648,652,656,660,664,668,672,676,680,684,688,692,696,868,872,876,880,884,888,892,896,900,904,908,912,916,920,924,928,932,936,940,944,948,952,956,960,964,968,972,976,980,984,988,992,996,1000,1004,1008,1012,1016,1020,1024,1028,1032,1036,1040,1044,1048,1052,1056,1060,1064,1068,1072,1076,1080,1084,1088,1092,1096,1100,1104,1108,1112,1116,1120,1124,1128,11!
 32,

> 1136,1140,1144,1148,1152,1156,1160,1164,1168,1172,1176,1180,1184,1188,1192,1196,1200,1204,1208,1212,1216,1220))
>
> at the prompt works fine.

Are you sure? It does not work for me, stopping in exactly the same place as you report for batch, and assuming the line break is casued by the mail system.

> Also source() works well. However, when
> calling a script that contains just this single command with R
> BATCH <script> the number "1160" is changed to "116+ 0" and this
> results in a syntax error. Why is that and how can it be fixed? I

By using a reasonable line length! R has a line length limit of 1024 chars on input. The + is a continuation prompt for the next line.

> use R Version 1.8.1 under Linux SUSE 9.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Jul 02 02:18:40 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:54:38 EST