From Richard.Cotton at hsl.gov.uk  Fri Oct  3 12:27:08 2008
From: Richard.Cotton at hsl.gov.uk (Richard.Cotton at hsl.gov.uk)
Date: Fri, 3 Oct 2008 11:27:08 +0100
Subject: [Rd] A strange behaviour of file.path in Windows? (PR#13119)
In-Reply-To: <20081003080506.4D9A52834611@hsl.gov.uk>
Message-ID: <OFCA860216.46491DB6-ON802574D7.00392230-802574D7.0039685B@hsl.gov.uk>

> If you send these lines of code:
> 
> outdir="c:/pippo"
> file.path(outdir,"pluto.html")
> 
> R replies correctly:
> 
> [1] "c:/pippo/pluto.html"
> 
> But if you change the first steps to:
> 
> outdir=""
> file.path(outdir,"pluto.html")
> 
> R replies (uncorrectly, I think)
> 
> [1] "/c:/pippo/pluto.html"

I don't get the same output as you.  Are you sure you haven't changed 
output somewhere else in your code?

outdir="c:/pippo"
file.path(outdir,"pluto.html")

[1] "c:/pippo/pluto.html"

outdir=""
file.path(outdir,"pluto.html")

[1] "/pluto.html"

This is under R2.7.2/ Win XP.

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}



[Rd] A strange behaviour of file.path in Windows? (PR#13119)
Richard.Cotton at hsl.gov.uk