I used sink() a lot under linux with no problems. Under windows 2000 & using R 1.5.1, I do the following: - use sink() to direct ouput to a file - use sink() again to direct output to screen - print the file (to a network printer) PROBLEM: the file stays spooled infinitely at the printer. Sometimes the spooling gets translated into a printer error. The only way to get any printing working again is to shutdown and restart (not even a reboot helps!) Am I misusing sink() under windows? I checked the R bugs archive and did not see this one listed. Thanks for any help Bill Simpson
On Mon, 13 Jan 2003, Simpson, William wrote:> I used sink() a lot under linux with no problems. > > Under windows 2000 & using R 1.5.1, I do the following: > - use sink() to direct ouput to a file > - use sink() again to direct output to screen > - print the file (to a network printer)How do you print it? (I tested this with "foo.txt", right-click to print which uses Notepad. Under current R, of course: I don't have such an old version around.)> PROBLEM: the file stays spooled infinitely at the printer. Sometimes the > spooling gets translated into a printer error. The only way to get any > printing working again is to shutdown and restart (not even a reboot helps!) > > Am I misusing sink() under windows?No. This is just a file that you can send to the printer: the problem appears to be in your print system.> I checked the R bugs archive and did not see this one listed.It's for bugs in R, so unsurprisingly does not cover Windows printing. -- Brian D. Ripley, ripley at 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
Thanks Brian for your help.> > I used sink() a lot under linux with no problems. > > > > Under windows 2000 & using R 1.5.1, I do the following: > > - use sink() to direct ouput to a file > > - use sink() again to direct output to screen > > - print the file (to a network printer) > > How do you print it? (I tested this with "foo.txt", right-click to > print which uses Notepad.I open the file under Notepad and select print. The job appears in the print queue (spooled).> Under current R, of course: I > don't have such > an old version around.)I don't have the proper privileges to install software on this machine so it is difficult for me to update very often.> > PROBLEM: the file stays spooled infinitely at the printer. > Sometimes the > > spooling gets translated into a printer error. The only way > to get any > > printing working again is to shutdown and restart (not even > a reboot helps!) > > > > Am I misusing sink() under windows? > > No. This is just a file that you can send to the printer: > the problem > appears to be in your print system.This problem only arises after using sink() in R.> > I checked the R bugs archive and did not see this one listed. > > It's for bugs in R, so unsurprisingly does not cover Windows printing.The bug would be that R's sink() function screws up Windows's printing somehow... Bill Simpson
Thanks again Brian.> > > Under current R, of course: I > > > don't have such > > > an old version around.) > > I don't have the proper privileges to install software on > this machine so it > > is difficult for me to update very often. > > R needs no privileges to install: our students do it from > user accounts > all the time.Perhaps your computers are set up differently. It was a while ago, but as I recall, the installation did not complete. I don't remember the exact message but it basically said you need to be superuser to fiddle with the registry, which is what the r-install wanted to do. The only time I can install software is when I just have an .exe file. The ones that go via "Installation Wizard" always need a superuser in my experience.> > > > I checked the R bugs archive and did not see this one listed. > > > > > > It's for bugs in R, so unsurprisingly does not cover > Windows printing. > > The bug would be that R's sink() function screws up > Windows's printing > > somehow... > > But it's *Notepad* that does the printing, not R.I thought *Windows* does the printing. (I don't know much about how windows works). Sorry if I wasn't clear. After doing R's sink() I can't print from *any* program. I thought R's sink() told *Windows* something about the output file. So for example a user can't delete it while R has it open for output. I thought that what R told windows about the file somehow screwed up printing generally. Otherwise I don't see why only R's sink() should trigger this printing problem. There quite definitely is a causal connection. Bill