Displaying 3 results from an estimated 3 matches for "n_reps".
2003 Dec 10
0
C++: SET_LENGTH() Over Many Iterations?
...\
do {\
UNPROTECT_PTR(v);\
SET_LENGTH(v, GET_LENGTH(v) + 1);\
PROTECT(v);\
INTEGER_POINTER(v)[GET_LENGTH(v) - 1] = x;\
}\
while (false)
SEXP R_SimplePushBackTest(SEXP args)
{
SEXP arg1, arg2, int_vect;
PROTECT(arg1 = AS_INTEGER(CADR(args)));
int n_reps = INTEGER_POINTER(arg1)[0];
PROTECT(arg2 = AS_LOGICAL(CADDR(args)));
bool full_alloc = (LOGICAL_POINTER(arg2)[0] ? true : false);
if (full_alloc)
PROTECT(int_vect = NEW_INTEGER(n_reps));
else
PROTECT(int_vect = NEW_INTEGER(0));
for (int i = 0; i < n_reps; ++i) {...
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
2001 Nov 16
2
pearson residuals in glm for binomial response (PR#1175)
R version 1.3.0
OS: SunOS 5.7, but I think the same problem occurs with Windows
An incorrect formula seems to be used to calculate the pearson residuals
for a generalized linear model with a binomial response. Here is a
simple program which gives (a) the pearson residuals calculated directly,
(b) the pearson residuals from glm, and (c) the deviance residuals from
glm. The first and last