Displaying 7 results from an estimated 7 matches for "islist".
Did you mean:
iolist
2019 May 01
3
anyNA() performance on vectors of POSIXct
...class()
x.posixct = Sys.time() + 1:1e6
microbenchmark::microbenchmark(
any(is.na( x.posixct )),
anyNA( x.posixct ),
anyNA( unclass(x.posixct) ),
unit='ms')
static Rboolean anyNA(SEXP call, SEXP op, SEXP args, SEXP env)
{
SEXP x = CAR(args);
SEXPTYPE xT = TYPEOF(x);
Rboolean isList = (xT == VECSXP || xT == LISTSXP), recursive = FALSE;
if (isList && length(args) > 1) recursive = asLogical(CADR(args));
*if (OBJECT(x) || (isList && !recursive)) {*
SEXP e0 = PROTECT(lang2(install("is.na"), x));
SEXP e = PROTECT(lang2(install("any&qu...
2019 May 21
0
anyNA() performance on vectors of POSIXct
...benchmark(
> any(is.na( x.posixct )),
> anyNA( x.posixct ),
> anyNA( unclass(x.posixct) ),
> unit='ms')
>
>
>
> static Rboolean anyNA(SEXP call, SEXP op, SEXP args, SEXP env)
> {
> SEXP x = CAR(args);
> SEXPTYPE xT = TYPEOF(x);
> Rboolean isList = (xT == VECSXP || xT == LISTSXP), recursive = FALSE;
>
> if (isList && length(args) > 1) recursive = asLogical(CADR(args));
> *if (OBJECT(x) || (isList && !recursive)) {*
> SEXP e0 = PROTECT(lang2(install("is.na"), x));
> SEXP e = PROTECT(l...
1997 Aug 15
1
R-alpha: (minor?) S-R inconsistency: NULL =~= list() -- useful is.ALL function
...cal = ",rr,"\n")
##if(1!=length(rr)) cat("f=",f," --- rr NOT of length 1; = ",rr,"\n")
if(true.only && length(rr)==1 && rr) r <- c(r, f)
else if(!true.only) r[[f]] <- rr
}
if(is.list(r)) structure(r, class = "isList") else r
}
print.isList <- function(r, ...)
{
## Purpose: print METHOD for 'isList' objects
## -------------------------------------------------------------------------
## Arguments:
## -------------------------------------------------------------------------
## Author...
2002 Aug 08
1
Ops.data.frame fails with second arg a list (PR#1889)
...Comparison of a data frame with a list fails with an error that
looks to be due to a typo in Ops.data.frame:
> d <- data.frame(1:10)
> d > list(5)
Error in Ops.data.frame(d, list(5)) : Object "scalar" not found
Code has:
rscalar <- length(e2) <= 1
if (isList(e2)) {
if (scalar)
and hence 'Object "scalar" not found'. Should it be 'rscalar'?
Baz
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "...
2006 Oct 15
1
Feature request: names(someEnv) same as ls(someEnv)
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
2008 Jan 04
1
Evaluating R expressions from C
..., like is.Environment; and I'm
fairly confident of R_len_t. Others I need some help.
Perhaps they are elswhere in the document? (My version of acrobat can't do
searches.) Is there another document that I should look at first?
Why "isNewList"? I would have guessed "isList". What's the difference?
Thanks for any help,
Terry Therneau
2010 Sep 08
0
Correction to vec-subset speed patch
...ript(SEXP x, SEXP s, int *stretch, SEXP call)
+SEXP attribute_hidden makeSubscript(SEXP x, SEXP s, int *stretch, SEXP call,
+ int used_to_replace)
{
- int nx;
- SEXP ans;
+ int nx, ns;
+ SEXP ans, tmp;
- ans = R_NilValue;
- if (isVector(x) || isList(x) || isLanguage(x)) {
- nx = length(x);
-
- ans = vectorSubscript(nx, s, stretch, getAttrib, (STRING_ELT),
- x, call);
- }
- else {
+ if (!isVector(x) && !isList(x) && !isLanguage(x)) {
ECALL(call, _("subscripting on non-vector"));
+ return R_Nil...