[R] png overwrites upper/lower case filenames

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue Apr 11 11:06:00 CEST 2006


Timo Becker wrote:

> Dear R users,
> 
> when I create files with the png graphics device, it overwrites existing 
> files which differ concerning upper/lower case file names.
> For example, I want to create four files named "a.png", "A.png", "b.png" 
> and "B.png" which contain the corresponding letters:
> 
> png("a.png")
> plot(1, type="n")
> text(1, label="a")
> dev.off()
> 
> png("A.png")
> plot(1, type="n")
> text(1, label="A")
> dev.off()
> 
> png("B.png")
> plot(1, type="n")
> text(1, label="B")
> dev.off()
> 
> png("b.png")
> plot(1, type="n")
> text(1, label="b")
> dev.off()
> 
> These commands create a file named "a.png" which contains the letter "A" 
> and a file named "B.png" which contains the letter "b".
> The old file name is retained, but overwritten with the output of the 
> new png device with the same case-insensitive file name.
> I'm sure I missed something. Can anyone tell me how to create files 
> whith case-sensitive names with the same letters?


You cannot on Windows. This is an OS but not an R issue.

Uwe Ligges


> R version 2.2.1, 2005-12-20, i386-pc-mingw32
> 
> Regards,
> Timo
>




More information about the R-help mailing list