From kwright at eskimo.com  Fri Nov  7 16:41:29 2003
From: kwright at eskimo.com (kwright@eskimo.com)
Date: Fri Nov  7 16:40:38 2003
Subject: [Rd] prompt function confusion (PR#4978)
Message-ID: <20031107154129.29713F424@slim.kubism.ku.dk>

Full_Name: Kevin Wright
Version: 1.8.0
OS: Windows 2000
Submission from: (NULL) (170.54.59.160)


(Apologies if this appears multiple times.  Web interface appeared to fail.)

Minor cosmetic issue 

The 'prompt' command contains this:

cat(strwrap(c(paste("Created file named", sQuote(filename),
"in the current directory."), paste("Edit the file and move it to the 
appropriate", "directory."))), sep="\n")

and thus ALWAYS says the file is created "in the current directory", even
when it has created the file elsewhere.

The documentation for 'getwd' says it returns the "current working 
directory."

Here is an example:

> getwd()
[1] "x:/"

> prompt(rf,filename="x:/R/rf.Rd")
Created file named 'x:/R/rf.Rd' in the current directory.
Edit the file and move it to the appropriate directory.

A simple fix would be to delete "in the current directory." from the 
prompt function.

A more detailed fix might parse the filename for the existence of a valid 
path.  If no path is included, then say "in the current directory".

Best,

Kevin Wright


[Rd] prompt function confusion (PR#4978)
kwright@eskimo.com