search for: nsexp

Displaying 1 result from an estimated 1 matches for "nsexp".

Did you mean: sexp
2004 Jun 14
5
mkChar can be interrupted
...another thread and as documented in R-exts .Call() should not be interruptible by Ctrl-C. However the following code, which spends most of its time inside mkChar, turned out to be interruptible on RH-7.3 R-1.8.1 gcc-2.96: #include <Rinternals.h> #include <R.h> SEXP foo0(const SEXP nSexp) { int i, n; SEXP resSexp; if (!isInteger(nSexp)) error("wrong arg type\n"); n = asInteger(nSexp); resSexp = PROTECT(allocVector(STRSXP, n)); Rprintf("!!!time to interrup!!!\n"); for (i=0; i<n; ++i) { SET_STRING_ELT(resSexp, i, mkChar("foo&qu...