[R] r help: source-function is very slow

Jos van Nijnatten j.vannijnatten at erasmusmc.nl
Thu Jan 19 15:34:26 CET 2012


Hello Uwe, Duncan and the rest of the community,
It indeed seemed to be a file system problem and I'm lucky to figure 
that out before it crashed. New computer's great and everything is 
working fine again.
Sorry for wasting your time ;-)


On Thursday, January 19, 2012 15:16, Duncan Murdoch wrote:
> On 12-01-19 8:25 AM, Jos van Nijnatten wrote:
>> Hello everybody,
>> I noticed a performance problem when using the source-function in R.
>> When I try to source an r script that is located in the same directory
>> as the script I execute via command line ('R -f file.r' contents
>> 'source("someOtherScript.r")') it's very fast. But if I put
>> 'someOtherScript.r' in another directory (say ../../R) R takes moments,
>> if not minutes to locate and load the script. Is there another way to do
>> this that is not slow?
>
> R uses the same method in both instances. If there's a difference in 
> timing, it's almost certainly because there's something going on with 
> your OS or file system.
>
> Duncan Murdoch



-- 
Jos van Nijnatten, BSc Candidate
Erasmus MC, Rotterdam, NL
Department of Bioinformatics
(ph) +31 1 07 04 45 51
(mob) +31 6 14 92 14 01
(e) j.vannijnatten at erasmusmc.nl



More information about the R-help mailing list