DT=data.table(a=1:2, b=3:4)
DT[, f(b), env = list(f=var), verbose=TRUE]
(currently errors, which #6029 addresses)
Has output:
Argument 'j' after substitute: (function (x, y = NULL, na.rm = FALSE, use) { if (missing(use)) use <- if (na.rm) "na.or.complete" else "everything" na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs", "everything", "na.or.complete")) if (is.na(na.method)) stop("invalid 'use' argument") if (is.data.frame(x)) x <- as.matrix(x) else stopifnot(is.atomic(x)) if (is.data.frame(y)) y <- as.matrix(y) else stopifnot(is.atomic(y)) .Call(C_cov, x, y, na.method, FALSE) })(b)
Obviously there's no way GForce is going to pick up that this could be gvar once it analyzes that convoluted j.
Are we stuck here? Is there no way to patch in the name var so that the outcome of env substitution becomes j=var(b) and then [ can just do normal processing to find GForce applies?
(currently errors, which #6029 addresses)
Has output:
Obviously there's no way
GForceis going to pick up that this could begvaronce it analyzes that convolutedj.Are we stuck here? Is there no way to patch in the name
varso that the outcome ofenvsubstitution becomesj=var(b)and then[can just do normal processing to find GForce applies?