Displaying 2 results from an estimated 2 matches for "pushback_test".
Did you mean:
pushback_list
2003 Dec 10
0
C++: SET_LENGTH() Over Many Iterations?
...teger.vector"));
SET_NAMES(out, names);
PROTECT(cls = NEW_CHARACTER(1));
SET_STRING_ELT(cls, 0, COPY_TO_USER_STRING("pushback"));
classgets(out, cls);
UNPROTECT(6);
return out;
}
</CPP Code>
<R Code>
nreps=50000
allocate=FALSE
sink("pushback_test.txt")
test.pushback=.External("R_SimplePushBackTest", as.integer(nreps), as.logical(allocate))
print(test.pushback)
sink()
</R Code>
If allocate=TRUE (vector memory is pre-allocated in the extension),
the code proceeds normally on my system; if allocate=FALSE, Rgui.exe
e...
2003 Dec 12
3
C++: Appending Values onto an R-Vector.
Hi folks. I posted this question a few days ago, but maybe it got lost
because of the code I included with it. I'm having a problem using the
SET_LENGTH() macro in an R extension I'm writing in C++. In a function
within the extension I use SET_LENGTH() to resize R vectors so as to
allow the concatenation of single values onto the vectors -- it's a
"push back" function to