search for: subdots

Displaying 2 results from an estimated 2 matches for "subdots".

Did you mean: subdirs
2017 Apr 30
1
`match.call` and dots substitution
...b = ..1, ... = pairlist(..2)) When the values in dots that need to be substituted are language, they get substituted by `..n` where `n` is the position in dots. When they are scalars they are substituted with the scalar. It appears this is done in 'R-3.4.0:src/main/unique.c at 1319' in `subDots`: while (TYPEOF(t) == PROMSXP) t = PREXPR(t); if( isSymbol(t) || isLanguage(t) ) SETCAR(b, installDDVAL(i)); else SETCAR(b, t); I'm not sure why it is necessary to use `installDDVAL`, which creates the `..n` symbols, instead of duplicating the language objec...
2015 Oct 30
0
match.call enhancements in 3.2.2
.....) > } > fun0(999, 2 + 2, 3 * pi(), 4) Returns: > fun_gpar(b = 999, ..2, ..3, 4) Instead of: > fun_gpar(b = 999, 2 + 2, 3 * pi(), 4) This is better than what used to happen before we had access to the `envir` parameter: > fun_gpar(b = ..1, ..2, 4) The dot substitution happens in `subDots` in `main/src/unique.c at 1228` (in 3.2.2 sources available as of today in CRAN).? Here is a snippet from that function: >??? for(a = dots, b = rval, i = 1; i <= len; a = CDR(a), b = CDR(b), i++) { >??? ??? SET_TAG(b, TAG(a)); >??? ??? t = CAR(a); >??? ??? while (TYPEOF(t) == PROMSXP...