@@ -39,8 +39,7 @@ SEXP ema (SEXP x, SEXP n, SEXP ratio, SEXP wilder) {
39
39
40
40
if (R_NilValue == n || i_n <= 0 ) {
41
41
if (R_NilValue == ratio || d_ratio <= 0.0 ) {
42
- error ("either 'n' or 'ratio' must be specified and > 0\n" ,
43
- "'n' is " , n , " 'ratio' is " , ratio );
42
+ error ("either 'n' or 'ratio' must be specified and > 0\n'n' is %d and 'ratio' is %1.6f" , i_n , d_ratio );
44
43
} else {
45
44
/* If ratio is specified, and n is not, set n to approx 'correct'
46
45
* value backed out from ratio */
@@ -246,8 +245,7 @@ SEXP zlema (SEXP x, SEXP n, SEXP ratio) {
246
245
247
246
if (R_NilValue == n || i_n <= 0 ) {
248
247
if (R_NilValue == ratio || d_ratio <= 0.0 ) {
249
- error ("either 'n' or 'ratio' must be specified and > 0\n" ,
250
- "'n' is " , n , " 'ratio' is " , ratio );
248
+ error ("either 'n' or 'ratio' must be specified and > 0\n'n' is %d and 'ratio' is %1.6f" , i_n , d_ratio );
251
249
} else {
252
250
/* If ratio is specified, and n is not, set n to approx 'correct'
253
251
* value backed out from ratio */
0 commit comments