search for: cadddr

Displaying 6 results from an estimated 6 matches for "cadddr".

Did you mean: caddr
2010 Jun 19
1
more powerful iconv
...ctor or raw")); if(!isString(CADR(args)) || length(CADR(args)) != 1) error(_("invalid '%s' argument"), "from"); if(!isString(CADDR(args)) || length(CADDR(args)) != 1) error(_("invalid '%s' argument"), "to"); if(!isString(CADDDR(args)) || length(CADDDR(args)) != 1) error(_("invalid '%s' argument"), "sub"); - if(STRING_ELT(CADDDR(args), 0) == NA_STRING) sub = NULL; + if(STRING_ELT(CADDDR(args), 0) == NA_STRING || isRawx) sub = NULL; else sub = translateChar(STRING_ELT(CADDDR(args), 0));...
2019 Nov 04
2
Questions on the R C API
Hi All, I have some questions regarding the R C API. Let's assume I have a function which is defined as follows: R file: myfunc <- function(a, b, ...) .External(Cfun, a, b, ...) C file: SEXP Cfun(SEXP args) { args = CDR(args); SEXP a = CAR(args); args = CDR(args); SEXP b = CAR(args); args = CDR(args); /* continue to do something with remaining arguments in "..."
2003 May 25
0
surprising behaviour of "bgroup": sets all in greek letters (PR#3099)
...(diff'ed to R-1.7.0 patched (2003-05-25)) > diff -u ./plotmath.old ./r-patched/src/main/plotmath.c --- ./plotmath.old 2003-05-25 17:47:23.000000000 +0200 +++ ./r-patched/src/main/plotmath.c 2003-05-25 17:49:38.000000000 +0200 @@ -2075,10 +2075,12 @@ delim2 = DelimCode(expr, CADDDR(expr)); bbox = RenderElement(CADDR(expr), 0); dist = max(bboxHeight(bbox) - axisHeight, bboxDepth(bbox) + axisHeight); - bbox = RenderDelim(delim1, dist + extra, draw); + if (delim1 != '.') + bbox = RenderDelim(delim1, dist + extra, draw); bbox = CombineBBoxe...
2019 Nov 04
0
Questions on the R C API
...of elements. See below ``` #define CAR(e) ((e)->u.listsxp.carval) #define CDR(e) ((e)->u.listsxp.cdrval) #define CAAR(e) CAR(CAR(e)) #define CDAR(e) CDR(CAR(e)) #define CADR(e) CAR(CDR(e)) #define CDDR(e) CDR(CDR(e)) #define CDDDR(e) CDR(CDR(CDR(e))) #define CADDR(e) CAR(CDR(CDR(e))) #define CADDDR(e) CAR(CDR(CDR(CDR(e)))) #define CAD4R(e) CAR(CDR(CDR(CDR(CDR(e))))) ``` You can use them to get first a few arguments from a pairlist. Another solution would be converting the pairlist into a list so that you can use the methods defined for a list to access any element. I do not know which C func...
2019 Nov 05
1
Questions on the R C API
...e) ((e)->u.listsxp.carval) > #define CDR(e) ((e)->u.listsxp.cdrval) > #define CAAR(e) CAR(CAR(e)) > #define CDAR(e) CDR(CAR(e)) > #define CADR(e) CAR(CDR(e)) > #define CDDR(e) CDR(CDR(e)) > #define CDDDR(e) CDR(CDR(CDR(e))) > #define CADDR(e) CAR(CDR(CDR(e))) > #define CADDDR(e) CAR(CDR(CDR(CDR(e)))) > #define CAD4R(e) CAR(CDR(CDR(CDR(CDR(e))))) > ``` > > You can use them to get first a few arguments from a pairlist. Another > solution would be converting the pairlist into a list so that you can use > the methods defined for a list to access any elemen...
2005 Sep 18
0
Updated rawConnection() patch
...ot;), "text"); sopen = CADDR(args); if(!isString(sopen) || length(sopen) != 1) - error(_("invalid '%s' argument"), "open"); + error(_("invalid '%s' argument"), "open"); open = CHAR(STRING_ELT(sopen, 0)); venv = CADDDR(args); if (!isEnvironment(venv) && venv != R_BaseEnv) error(_("invalid '%s' argument"), "environment"); ncon = NextConnection(); - if(!strlen(open) || strncmp(open, "r", 1) == 0) + if(!strlen(open) || (open[0] == 'r')) { + int...