| Line 425... |
Line 425... |
| 425 |
|
425 |
|
| 426 |
|
426 |
|
| 427 |
/* the global accumulator should be safe if we only do 1 cummulative or
|
427 |
/* the global accumulator should be safe if we only do 1 cummulative or
|
| 428 |
* aggregate at any time. it won't work for stuffs like "select max(col)-min(col)
|
428 |
* aggregate at any time. it won't work for stuffs like "select max(col)-min(col)
|
| 429 |
* from sdf_data". */
|
429 |
* from sdf_data". */
|
| 430 |
static double g_accumulator = 0.0; /* accumulator var for cumsum, cumprod, etc. */
|
430 |
static long double g_accumulator = 0.0; /* accumulator var for cumsum, cumprod, etc. */
|
| 431 |
static int g_start = 0; /* flag for start of cummulation */
|
431 |
static int g_start = 0; /* flag for start of cummulation */
|
| 432 |
static int g_narm = 0; /* for Summary group */
|
432 |
static int g_narm = 0; /* for Summary group */
|
| 433 |
|
433 |
|
| 434 |
SEXP sdf_do_variable_math(SEXP func, SEXP vector, SEXP extra_args, SEXP _nargs) {
|
434 |
SEXP sdf_do_variable_math(SEXP func, SEXP vector, SEXP extra_args, SEXP _nargs) {
|
| 435 |
char *iname, *iname_src, *varname_src, *funcname;
|
435 |
char *iname, *iname_src, *varname_src, *funcname;
|