Re: [R] A function taken out of its original environment performs more slowly.

2013-08-19 Thread Duncan Murdoch
On 13-08-17 7:05 PM, Xiao He wrote: Hi dear R-users, I encountered an interesting pattern. Take for example the function combn(), I copied and pasted the function definition and saved it as a new function named combn2() (see the end of this email). As it turned out, combn2() seems to be

[R] A function taken out of its original environment performs more slowly.

2013-08-17 Thread Xiao He
Hi dear R-users, I encountered an interesting pattern. Take for example the function combn(), I copied and pasted the function definition and saved it as a new function named combn2() (see the end of this email). As it turned out, combn2() seems to be substantially slower than the original

Re: [R] A function taken out of its original environment performs more slowly.

2013-08-17 Thread Uwe Ligges
On 18.08.2013 01:05, Xiao He wrote: Hi dear R-users, I encountered an interesting pattern. Take for example the function combn(), I copied and pasted the function definition and saved it as a new function named combn2() (see the end of this email). As it turned out, combn2() seems to be