From sfalcon at fhcrc.org  Sun Oct 15 20:48:45 2006
From: sfalcon at fhcrc.org (Seth Falcon)
Date: Sun, 15 Oct 2006 11:48:45 -0700
Subject: [Rd] Feature request: names(someEnv) same as ls(someEnv)
Message-ID: <m21wp9e7oy.fsf@ziti.local>

Hi,

I would be nice if names() returned the equivalent of ls() for
environments.

--- a/src/main/attrib.c
+++ b/src/main/attrib.c
@@ -687,6 +687,8 @@ SEXP attribute_hidden do_names(SEXP call
     s = CAR(args);
     if (isVector(s) || isList(s) || isLanguage(s))
        return getAttrib(s, R_NamesSymbol);
+    if (isEnvironment(s))
+        return R_lsInternal(s, 0);
     return R_NilValue;
 }


+ seth

--
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
http://bioconductor.org




[Rd] Feature request: names(someEnv) same as ls(someEnv)
Seth Falcon