Rev 6362 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{options}\title{Options Settings}\usage{options(\dots).Options}\alias{options}\alias{.Options}\arguments{\item{\dots}{any options can be defined, using \code{name = value}.However, only the ones below are used in ``base \R''.Further, \code{options('name') == options()['name']}, see the example.}\item{prompt}{a string, used for \R's prompt; should usually end in ablank (\code{" "}).}\item{continue}{a string setting the prompt used for lines which continueover one line.}\item{width}{controls the number of characters on a line. You maywant to change this if you resize the window that \R is running in.}\item{digits}{controls the number of digits to print when printingnumeric values. It is a suggestion only.}\item{editor}{sets the default text editor, e.g., for \code{\link{edit}}.}\item{browser}{default HTML browser used by \code{\link{help.start}()}.}\item{contrasts}{the default \code{\link{contrasts}} used in modelfitting such as with \code{\link{aov}} or \code{\link{lm}}.}\item{expressions}{sets a limit on the number of nested expressions thatwill be evaluated. This is especially important on the Macintoshsince stack overflow is likely if this is set too high.}\item{keep.source}{When \code{TRUE}, the default, the source code forfunctions loaded by is stored in their \code{"source"} attribute,allowing comments to be kept in the right places. This does not applyto functions loaded by \code{library}.}\item{na.action}{the name of a function for treating missing values(\code{\link{NA}}'s) for certain situations.}\item{pager}{the (standalone) program used for displaying ASCII files on\R's console. Defaults to \file{\$R\_HOME/bin/pager}.}\item{papersize}{the paper format used for graphics printing; currently\bold{read-only}, set by environment variable \code{R_PAPERSIZE}, or in\file{config.site}.}\item{printcmd}{the command used for graphics printing; currently\bold{read-only}, set by environment variable \code{R_PRINTCMD}, or in\file{config.site}.}\item{show.signif.stars, show.coef.Pvalues}{logical, affecting P valueprinting, see \code{\link{print.coefmat}}.}\item{ts.eps}{the relative tolerance for certain time series(\code{\link{ts}}) computations.}\item{warn}{sets the handling of warning messages. If \code{warn}is negative all warnings are ignored. If \code{warn} is zero (the default)warnings are stored until the top--level function returns. If fewer than 10warnings were signalled they will be printed otherwise a messagesaying how many (max 50) were signalled. A top--level variable called\code{last.warning} is created and can be viewed through the function\code{\link{warnings}}. If \code{warn} is one, warnings are printedas they occur. If \code{warn} is two or larger all warnings are turnedinto errors.}\item{error}{an expression governing the handling of non-catastrophic errorssuch as those generated by \code{\link{stop}} as well as by signalsand internally detected errors. The default expression is \code{NULL}: see\code{\link{stop}} for the behaviour in that case.}}\description{\code{options} allows the user to set and examine a variety of global``options'' which affect the way in which \R computes and displaysits results.}\details{Invoking \code{options()} with no arguments returns a list with thecurrent values of the options.\code{.Options} is another way to access this list \bold{``read only''}.Accessing current options, usually will work with \code{.Options$width}(e.g.), rather than \code{options("width")} which is a \emph{list} oflength one.}\value{A list (in any case) with the previous values of the options changed,or all options when no arguments were given.}\examples{options() # printing all current optionsop <- options(); str(op) # nicer printing# .Options is the same:all(sapply(1:length(op), function(i) all(.Options[[i]] == op[[i]])))options('width')[[1]] == options()$width # the latter needs more memoryoptions(digits=20)pi# set the editor, and save previous valueold.o <- options(editor="nedit")old.ooptions(op) # reset (all) initial optionsoptions('digits')\dontrun{## on error, terminate the R session with error status 66options(error=quote(q("no", status=66, runLast=FALSE)))stop("test it")}}\keyword{environment}%later, when we'll have an error handler : \keyword{error}\keyword{print}