Hi, I'm using R2.8.1 in windows vista and the scan function to load in my data. That works all fine except that I get a message after the scan function finishes. It tells me how many items the function has read. For example "Read 202035 items". That would not be a problem but this is printed in the stderr stream which causes a problem in a different software I run the r scipt in. I have no way to influence this other software. Any suggestions how to avoid this message getting printed. I tried optionsoptions(warn=-1) which obviously dos not work because it is not a warning but options(show.error.messages=F) does not work either. Thanks for your help Christoph
Try this: scan(..., quiet = TRUE) On Tue, Nov 23, 2010 at 9:01 PM, Martin Knapp <mkna005@aucklanduni.ac.nz>wrote:> Hi, > I'm using R2.8.1 in windows vista and the scan function to load in my > data. That works all fine except that I get a message after the scan > function finishes. It tells me how many items the function has read. > For example "Read 202035 items". That would not be a problem but this > is printed in the stderr stream which causes a problem in a different > software I run the r scipt in. I have no way to influence this other > software. Any suggestions how to avoid this message getting printed. > I tried optionsoptions(warn=-1) which obviously dos not work because > it is not a warning but options(show.error.messages=F) does not work > either. > > Thanks for your help > > Christoph > > ______________________________________________ > 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. >-- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
Martin - Type help(scan) or ?scan to see scan's help file, which includes: quiet: logical: if ?FALSE? (default), scan() will print a line, saying how many items have been read. So adding quiet=TRUE to your call to scan will suppress the message. - Phil Spector Statistical Computing Facility Department of Statistics UC Berkeley spector at stat.berkeley.edu On Wed, 24 Nov 2010, Martin Knapp wrote:> Hi, > I'm using R2.8.1 in windows vista and the scan function to load in my > data. That works all fine except that I get a message after the scan > function finishes. It tells me how many items the function has read. > For example "Read 202035 items". That would not be a problem but this > is printed in the stderr stream which causes a problem in a different > software I run the r scipt in. I have no way to influence this other > software. Any suggestions how to avoid this message getting printed. > I tried optionsoptions(warn=-1) which obviously dos not work because > it is not a warning but options(show.error.messages=F) does not work > either. > > Thanks for your help > > Christoph > > ______________________________________________ > R-help at 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. >