From ripley@stats.ox.ac.uk  Sun Oct 29 17:17:42 2000
From: ripley@stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Sun, 29 Oct 2000 18:17:42 +0100 (MET)
Subject: [Rd] width in options() (PR#666)
Message-ID: <200010291717.SAA23441@pubhealth.ku.dk>

On Thu, 21 Sep 2000 aprasad@fs.fed.us wrote:

> Full_Name: Anantha Prasad
> Version: 1.1.1
> OS: Linux
> Submission from: (NULL) (199.131.134.57)
> 
> 
> When I try to use 
> > options(width=201)
> Error in options(...) : invalid width parameter
> It looks like 200 is the max. limit. THis is a huge limitation...for if I
am

[...]

> This limitation is not there in S-PLUS where you can set the width to any
> number.
> Hope this is fixed soon as many scripts I use depend on me setting width
to
> atleast
> 2000!

It's set as macro R_MAX_WIDTH_OPT in Print.h.  All you needed to do is to
change that and re-compile.  Simple, surely?   Even simple things like this
take time to track down and deal with, so it would be appreciated if bug
reporters could contribute to the R project by doing as much as they can
themselves.

Presumably it is there to protect people from themselves, but as e.g.
strings can come out much longer I don't think it is very effective.
Alternatively as it dates from the era of fixed-size output buffers it
might have been to protect R, but that seems no longer necessary,
at least on a Unix console (it might be on other output devices).

I've upped the limit to 10000 and added comments in the help file and
a more informative warning:

> options(width=-17)
Error in options(...) : invalid width parameter, allowed 10...10000


-- 
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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] width in options() (PR#666)
ripley@stats.ox.ac.uk