Rev 9615 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{bug.report}\alias{bug.report}\title{Send a Bug Report}\usage{bug.report(subject = "", ccaddress = Sys.getenv("USER"),method = getOption("mailer"), address = "r-bugs@biostat.ku.dk",file = "R.bug.report")}\arguments{\item{subject}{Subject of the email. Please do not use single quotes(\code{'}) in the subject!}\item{ccaddress}{Optional email address for copies (default is currentuser). Use \code{ccaddress = FALSE} for no copies.}\item{method}{Submission method, one of \code{"mailx"},\code{"gnuclient"}, \code{"none"}, or \code{"ess"}.}\item{address}{Recipient's email address.}\item{file}{File to use for setting up the email (or storing it whenmethod is \code{"none"} or sending mail fails).}}\description{Invokes an editor to write a bug report and optionally mail it to theR-bugs list at \email{r-bugs@biostat.ku.dk}. Some standardinformation on the current version and configuration of \R areincluded automatically.}\details{Currently direct submission of bug reports works only on Unix systems.If the submission method is \code{"mailx"}, then the default editor isused to write the bug report. Which editor is used can be controlledusing \code{\link{options}}, type \code{getOption("editor")} to see whateditor is currently defined. Please use the help pages of therespective editor for details of usage. After saving the bug report(in the temporary file opened) and exiting the editorthe report is mailed using a Unix command line mail utility such as\code{mailx}. A copy of the mail is sent to the current user.If method is \code{"gnuclient"}, then an emacs mail buffer is openedand used for sending the email.If method is \code{"none"} or \code{NULL} (which is the default onWindows systems), then only an editor is opened to help writing thebug report. The report can then be copied to your favorite emailprogram and be sent to the R-bugs list.If method is \code{"ess"} the body of the mail is simply sent tostdout.}\value{Nothing useful.}\section{When is there a bug?}{If \R executes an illegal instruction, or dies with an operatingsystem error message that indicates a problem in the program (asopposed to something like ``disk full''), then it is certainly a bug.Taking forever to complete a command can be a bug, but you must makecertain that it was really \R's fault. Some commands simply take along time. If the input was such that you KNOW it should have beenprocessed quickly, report a bug. If you don't know whether thecommand should take a long time, find out by looking in the manual orby asking for assistance.If a command you are familiar with causes an \R error message in acase where its usual definition ought to be reasonable, it is probablya bug. If a command does the wrong thing, that is a bug. But be sureyou know for certain what it ought to have done. If you aren'tfamiliar with the command, or don't know for certain how the commandis supposed to work, then it might actually be working right. Ratherthan jumping to conclusions, show the problem to someone who knows forcertain.Finally, a command's intended definition may not be best forstatistical analysis. This is a very important sort of problem, butit is also a matter of judgment. Also, it is easy to come to such aconclusion out of ignorance of some of the existing features. It isprobably best not to complain about such a problem until you havechecked the documentation in the usual ways, feel confident that youunderstand it, and know for certain that what you want is notavailable. If you are not sure what the command is supposed to doafter a careful reading of the manual this indicates a bug in themanual. The manual's job is to make everything clear. It is just asimportant to report documentation bugs as program bugs. However, weknow that the introductory documentation is seriously inadequate, soyou don't need to report this.If the online argument list of a function disagrees with the manual,one of them must be wrong, so report the bug.}\section{How to report a bug}{When you decide that there is a bug, it is important to report it andto report it in a way which is useful. What is most useful is anexact description of what commands you type, from when you start \Runtil the problem happens. Always include the version of \R, machine,and operating system that you are using; type `version' in \R to printthis.The most important principle in reporting a bug is to report FACTS,not hypotheses or categorizations. It is always easier to report thefacts, but people seem to prefer to strain to posit explanations andreport them instead. If the explanations are based on guesses abouthow \R is implemented, they will be useless; we will have to try tofigure out what the facts must have been to lead to suchspeculations. Sometimes this is impossible. But in any case, it isunnecessary work for us.For example, suppose that on a data set which you know to be quitelarge the command \code{data.frame(x, y, z, monday, tuesday)} neverreturns. Do not report that \code{data.frame()} fails for large datasets. Perhaps it fails when a variable name is a day of the week. Ifthis is so then when we got your report we would try out the\code{data.frame()} command on a large data set, probably with no dayof the week variable name, and not see any problem. There is no way inthe world that we could guess that we should try a day of the weekvariable name.Or perhaps the command fails because the last command you used was a\code{[} method that had a bug causing \R's internal data structuresto be corrupted and making the \code{data.frame()} command fail fromthen on. This is why we need to know what other commands you havetyped (or read from your startup file).It is very useful to try and find simple examples that produceapparently the same bug, and somewhat useful to find simple examplesthat might be expected to produce the bug but actually do not. If youwant to debug the problem and find exactly what caused it, that iswonderful. You should still report the facts as well as anyexplanations or solutions.Invoking \R with the \code{--vanilla} option may help in isolating abug. This ensures that the site profile and saved data files are notread.On some systems a bug report can be generated using the\code{bug.report()} function. This automatically includes the versioninformation and sends the bug to the correct address. Alternativelythe bug report can be emailed to \email{r-bugs@biostat.ku.dk} orsubmitted to the Web page at \url{http://r-bugs.biostat.ku.dk/R}.}\seealso{R FAQ}\author{This help page is adapted from the Emacs manual}\keyword{utilities}\keyword{error}