Waichler, Scott R
2005-Apr-29 17:55 UTC
[R] postscript() filenames with forward slashes cause abort
My newly installed R-2.1.0 apparently doesn't like forward slashes in filenames:> R.version.string[1] "R version 2.1.0, 2005-04-18"> plotfile <- "\home\mean_monthly_stl.eps" > postscript(plotfile) > plotfile <- "/home/mean_monthly_stl.eps" > postscript(plotfile)*** glibc detected *** double free or corruption (!prev): 0x098e7180 *** Abort Does this have something to do with UTF-8 (about which I know little)? Scott Waichler Pacific Northwest National Laboratory scott.waichler at pnl.gov
Peter Dalgaard
2005-Apr-29 18:10 UTC
[R] postscript() filenames with forward slashes cause abort
"Waichler, Scott R" <Scott.Waichler at pnl.gov> writes:> My newly installed R-2.1.0 apparently doesn't like forward slashes in > filenames: > > > R.version.string > [1] "R version 2.1.0, 2005-04-18" > > plotfile <- "\home\mean_monthly_stl.eps" > > postscript(plotfile) > > plotfile <- "/home/mean_monthly_stl.eps" > > postscript(plotfile) > *** glibc detected *** double free or corruption (!prev): 0x098e7180 *** > Abort > > Does this have something to do with UTF-8 (about which I know little)?I would conjecture that it has to do with the fact that you do not have write permission in /home! The backslashed version just creates homemean_monthly_stl.eps in the current directory. If you substitute /tmp for /home, the problem goes away (provided you're on some kind of Unix/Linux -- you didn't say). It's still a bug of course. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Waichler, Scott R
2005-Apr-29 18:26 UTC
[R] postscript() filenames with forward slashes cause abort
> > My newly installed R-2.1.0 apparently doesn't like forward > slashes in > > filenames: > > > > > R.version.string > > [1] "R version 2.1.0, 2005-04-18" > > > plotfile <- "\home\mean_monthly_stl.eps" > > > postscript(plotfile) > > > plotfile <- "/home/mean_monthly_stl.eps" > > > postscript(plotfile) > > *** glibc detected *** double free or corruption (!prev): > 0x098e7180 > > *** Abort > > > > I would conjecture that it has to do with the fact that you > do not have write permission in /home! The backslashed > version just creates homemean_monthly_stl.eps in the current > directory. If you substitute /tmp for /home, the problem goes > away (provided you're on some kind of Unix/Linux -- you > didn't say). It's still a bug of course.Yes, that was it. When I first came across the problem, I had a typo in my longish pathname. For the post to R Help I wanted to simplify the problem as much as possible, and as luck would have it, I picked a shorter pathname that was not writeable by me. Thanks, Scott