Re: [Rd] Minor "bug" in source()

2005-07-19 Thread Prof Brian Ripley
I think at least a warning is appropriate here (and also for a URL), so have modified the code to have one in each case. There is a reason why the chdir code is later, after the parsing, for it was thought more important to get an error from parsing than from failing to chdir. On Tue, 19 Jul 2

[Rd] Minor "bug" in source()

2005-07-19 Thread Henrik Bengtsson
For R v2.1.1 patched and R v2.2.0 devel: Calling source(file, chdir=TRUE) with is.character(file) != TRUE, that is, with 'file' as a connection, will generate an error. Example: > file <- textConnection("cat('Hello world\n')") > source(file, chdir=TRUE) Error in source(file, chdir = TRUE) : Ob