[R] Puzzled at a trivial function using Hmisc::setps
Gabor Grothendieck
ggrothendieck at myway.com
Sat Oct 23 08:22:07 CEST 2004
Ajay Shah <ajayshah <at> mayin.org> writes:
:
: I have done:
:
: library(Hmisc)
: mysetps <- function(f) {setps(filename=f, w=4.5)}
:
: Now when I set about doing
:
: mysetps("a")
: blah
: mysetps("b")
: blah
:
: etc.
:
: Problem: I find that only one file "f.ps" gets created.
:
: My intent had been to create "a.ps", "b.ps", etc., all using the
: argument w=4.5 with the setps() function of Hmisc::setps.
:
: Just in case it was R being unhappy with one-letter variable names, as
: sometimes happens, I also replaced "f" with "file" and that didn't help.
:
setps assumes the filename is unquoted unless you specify
type = "char" like this:
mysetps <- function(f) {setps(filename=f, w=4.5, type = "char")}
More information about the R-help
mailing list