search for: makesubscript

Displaying 3 results from an estimated 3 matches for "makesubscript".

2010 Sep 08
0
Correction to vec-subset speed patch
...part -------------- Index: src/include/Defn.h =================================================================== --- src/include/Defn.h (revision 52822) +++ src/include/Defn.h (working copy) @@ -1003,7 +1003,7 @@ void KillAllDevices(void); SEXP levelsgets(SEXP, SEXP); void mainloop(void); -SEXP makeSubscript(SEXP, SEXP, int *, SEXP); +SEXP makeSubscript(SEXP, SEXP, int *, SEXP, int); SEXP markKnown(const char *, SEXP); SEXP mat2indsub(SEXP, SEXP, SEXP); SEXP matchArg(SEXP, SEXP*); Index: src/main/subassign.c =================================================================== --- src/main/subassign.c...
2017 Oct 01
0
Revert to R 3.2.x code of logicalSubscript in subscript.c?
...the case of no recycling is handled like the implentation of R function 'which'. It passes through the data only once, but uses more memory. It is since R 3.3.0. For the case of recycling, two passes are done, first to get number of elements in the result. Also since R 3.3.0, function 'makeSubscript' in subscript.c doesn't call 'duplicate' on logical index vector. A side note: I guess that it is safe not to call 'duplicate' on logical index vector, even if it is the one being modified in subassignment, because it is converted to positive indices before use in extractio...
2010 Jul 15
1
Very slow subsetting by name
Hi, I'm subsetting a named vector using character indices. My vector of indices (or keys) is 10x longer than the vector I'm subsetting. All my keys are distinct and only 10% of them are valid (i.e. match a name of the vector being subsetted). It is surprisingly slow: x1 <- 1:1000 names(x1) <- paste("a", x1, sep="") keys <- sample(c(names(x1),