Displaying 3 results from an estimated 3 matches for "r_lsinternal".
Did you mean:
r_internal
2006 Oct 15
1
Feature request: names(someEnv) same as ls(someEnv)
...lent 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
2006 Apr 11
1
eapply() fails on baseenv() (PR#8761)
eapply() works on most environments, but not on baseenv(). For example,
> x <- 1
> eapply(globalenv(), function(x) x)
$x
[1] 1
> eapply(baseenv(), function(x) x)
list()
I'm probably not going to have time to work on this before 2.3.0, but I
don't think it's really urgent; if no one else fixes it first I'll do it
after the release.
Duncan Murdoch
2014 Mar 05
1
[PATCH] Code coverage support proof of concept
...econd the nb of occurrences
+ */
+SEXP do_Rcov_stop(void)
+{
+ SEXP names, lines, mat, key, res;
+ int n, i, j, k, nb_lines, non_empty_lines, *tab, *m;
+
+ /* stop the code covered tracing */
+ R_Code_Coverage = 0;
+
+ /* convert frequencies by line to matrix N*2 of lines, freq */
+ PROTECT(names = R_lsInternal(R_Cov_freqs_hash, FALSE));
+ n = length(names);
+
+ for (i = 0; i < n; ++i) {
+ key = install(CHAR(STRING_ELT(names, i)));
+ lines = findVarInFrame(R_Cov_freqs_hash, key);
+
+ tab = INTEGER(lines);
+ nb_lines = length(lines);
+ non_empty_lines = 0;
+ for (j = 0; j < nb_lines; ++j)
+ i...