Re: [Rd] Converting an environment to a list: mget vs. as.list

2013-04-22 Thread Hadley Wickham
> I'd say the more interesting part is that ls() is so "slow" if you use the > ambiguous "name" argument instead of the direct "envir" one: > >> microbenchmark(ls(env), ls(envir=env), .Internal(ls(env, FALSE))) > Unit: nanoseconds > expr minlq medianuq max neval >

Re: [Rd] Converting an environment to a list: mget vs. as.list

2013-04-22 Thread Simon Urbanek
On Apr 22, 2013, at 9:14 AM, Hadley Wickham wrote: > Hi all, > > An interesting discovery: if you want to convert an environment to a > list, and you already know the names of the objects in the > environment, using mget is about twice as fast as using as.list on the > environment. > I'd say th

[Rd] Converting an environment to a list: mget vs. as.list

2013-04-22 Thread Hadley Wickham
Hi all, An interesting discovery: if you want to convert an environment to a list, and you already know the names of the objects in the environment, using mget is about twice as fast as using as.list on the environment. https://gist.github.com/hadley/5434786 Hadley -- Chief Scientist, RStudi