Skip to content
Prev 319310 / 398506 Next

ls() with different defaults: Solution;

-----Original Message-----
From: Hadley Wickham [mailto:h.wickham at gmail.com] 
Sent: Tuesday, 12 March, 2013 1:34 PM
To: Szumiloski, John
Cc: r-help at r-project.org
Subject: Re: [R] ls() with different defaults: Solution;
On Tue, Mar 12, 2013 at 12:59 PM, Szumiloski, John <john_szumiloski at merck.com> wrote:
Why not just do:

lsall  <-  function(..., all.names = TRUE) {
  ls(..., all.names = all.names)
}

?   Then the function practically documents itself.

The search path of the internal ls() is not the same as that of the called lsall().  You then get (e.g.)
[1] "..."       "all.names"

John



Hadley

--
Chief Scientist, RStudio
http://had.co.nz/
Notice:  This e-mail message, together with any attachme...{{dropped:11}}