search for: caar

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

Did you mean: car
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 "..."
2019 Nov 04
0
Questions on the R C API
...rrect me if so). Therefore, there is no simple way to locate an element in a pairlist. As for as I know, R defines a set of convenient functions for you to access a limited number 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 argumen...
2019 Nov 05
1
Questions on the R C API
...simple way to locate an > element in a pairlist. As for as I know, R defines a set of > convenient functions for you to access a limited number 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))))) > ``` >...