Re: [R] Problem with pdf, png, jpeg devices and files named CON on Window s

From: talepanda <talepanda_at_gmail.com>
Date: Mon 15 Jan 2007 - 10:22:15 GMT

It's not R problem but specification of windows file system. see MSDN:

http://msdn2.microsoft.com/en-us/library/aa365247.aspx

On 1/15/07, Brandt, T. (Tobias) <TobiasBr@taquanta.com> wrote:
> Hi
>
> I cannot seem to create any files that have the name "CON" before the file
> extension, i.e. all of the following fail:
>
> > pdf("CON.pdf")
> Error in pdf("CON.pdf") : unable to start device pdf
> > jpeg('CON.jpeg')
> Error in jpeg("CON.jpeg") : unable to start device devWindows
> > png('CON.png')
> Error in png("CON.png") : unable to start device devWindows
> > sink('CON.txt')
> Error in file(file, ifelse(append, "a", "w")) :
> unable to open connection
> >
>
> Any filename other than this works fine.
>
> > png('ICON.png')
> > dev.off()
> null device
> 1
> > png('CON1.png')
> > dev.off()
> null device
> 1
> > sink('log.txt')
> > sink()
> >
>
> Remembering that in the old DOS days, commands like 'copy CON myfile.bat'
> were common, I suspected that this has something to do with CON being a
> reserved word so I tried to create the files manually in Windows explorer.
> Creating files named 'CON.png', 'CON.pdf', 'CON.txt' all work fine. However
> I did notice that Windows won't let me create a file named just "CON".
> However since the devices that I'm trying to create have extensions, I don't
> understand why they fail.
>
> Who can help?
>
> Thanks
> Tobias
>
>
> > version
> _
> platform i386-pc-mingw32
> arch i386
> os mingw32
> system i386, mingw32
> status
> major 2
> minor 3.1
> year 2006
> month 06
> day 01
> svn rev 38247
> language R
> version.string Version 2.3.1 (2006-06-01)
> >
>
> > Sys.info()
> sysname release
> version nodename
> "Windows" "NT 5.1" "(build 2600)
> Service Pack 2"
> machine login
> user
> "x86"
> >
>
> ********************
> Nedbank Limited Reg No 1951/000009/06. The following link displays the names
> of the Nedbank Board of Directors and Company Secretary. [
> http://www.nedbank.co.za/terms/DirectorsNedbank.htm ]
> This email is confidential and is intended for the addressee only. The
> following link will take you to Nedbank's legal notice. [
> http://www.nedbank.co.za/terms/EmailDisclaimer.htm ]
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>



R-help@stat.math.ethz.ch 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. Received on Mon Jan 15 21:27:29 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 Jan 2007 - 11:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.