search for: nyy

Displaying 2 results from an estimated 2 matches for "nyy".

Did you mean: ny
2011 Apr 15
1
[Rcpp-devel] Find number of elements less than some number: Elegant/fastsolution needed
...(and this always confuses me, so I tend to avoid it), I'm seeing an additional ~5-10% speed gain (src2, f5) -- the advantage of this last seems to be primarily in memory-constrained applications. On to the code! src = ' NumericVector xx_(clone(x)), yy_(clone(y)); int nxx = xx_.size(); int nyy = yy_.size(); arma::vec xx(xx_), yy(yy_); yy = sort(yy); xx = sort(xx); // // int j = 0; //gt index for yy for (int i=0; i < nxx; i++) { while ((j < nyy) && ( xx(i) > yy(j) ) ) { j++; } xx_(i) = j; } return (xx_); ' src1 = ' NumericVector xx_(clone(x...
2012 Jan 15
0
patching ?merge to allow the user to keep the order of one of the two data.frame objects merged
...y.alone = seq_len(ny)) nm <- nm.x <- names(x)[-by.x] nm.by <- names(x)[by.x] nm.y <- names(y)[-by.y] ncx <- ncol(x) if (all.x) all.x <- (nxx <- length(m$x.alone)) > 0L if (all.y) all.y <- (nyy <- length(m$y.alone)) > 0L lxy <- length(m$xi) has.common.nms <- any(cnm <- nm.x %in% nm.y) if (has.common.nms) nm.x[cnm] <- paste(nm.x[cnm], suffixes[1L], sep = "") x <- x[c(m$xi, if (all.x) m$x.alone), c(by.x, seq_len(ncx)...