[R] Problem sourcing file
Duncan Murdoch
murdoch.duncan at gmail.com
Sun May 27 22:03:34 CEST 2012
On 12-05-27 3:25 PM, Jeff Newmiller wrote:
> The source function is quite convenient for invoking a set of R commands that have already been debugged. It is pretty worthless for troubleshooting. You need to step through those commands one at a time, then do it again, to see which command triggers this error.
source() is fine for troubleshooting: just use the echo=TRUE option,
and you'll see when it fails. In 2.15.0-patched, it can even report the
line of the source file that caused the problem.
Reza was bitten by a bug in 2.14.0, that's all.
Duncan Murdoch
> My response to the last version of this query stands... what is in "~/Documents/myFile.R"?
> ---------------------------------------------------------------------------
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> Reza Salimi-Khorshidi<reza at fmrib.ox.ac.uk> wrote:
>
>> Hi all,
>> I have the exact same problem in R 2.14.0, which does not seem to be
>> due to
>> using the quotation mark. When I say
>> source("~/Documents/myFile.R")
>> for the first time (after I start R), it works fine, but when I run it
>> for
>> a second time (even when I empty the workspace and rerun every thing,
>> just
>> like the first time), it returns the exact same error, i.e.,
>>
>> Error in srcfilecopy(filename, lines, file.info(filename)[1, "mtime"])
>> :
>> unused argument(s) (file.info(filename)[1, "mtime"])
>>
>> Can you please help?
>> Cheers
>
More information about the R-help
mailing list