|
| 1 | +# arx_args checks inputs |
| 2 | + |
| 3 | + Code |
| 4 | + arx_args_list(ahead = c(0, 4)) |
| 5 | + Condition |
| 6 | + Error in `arx_args_list()`: |
| 7 | + ! `ahead` must be a scalar. |
| 8 | + |
| 9 | +--- |
| 10 | + |
| 11 | + Code |
| 12 | + arx_args_list(n_training = c(28, 65)) |
| 13 | + Condition |
| 14 | + Error in `arx_args_list()`: |
| 15 | + ! `n_training` must be a scalar. |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | + Code |
| 20 | + arx_args_list(ahead = -1) |
| 21 | + Condition |
| 22 | + Error in `arx_args_list()`: |
| 23 | + ! `ahead` must be a non-negative integer. |
| 24 | + |
| 25 | +--- |
| 26 | + |
| 27 | + Code |
| 28 | + arx_args_list(ahead = 1.5) |
| 29 | + Condition |
| 30 | + Error in `arx_args_list()`: |
| 31 | + ! `ahead` must be a non-negative integer. |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | + Code |
| 36 | + arx_args_list(n_training = -1) |
| 37 | + Condition |
| 38 | + Error in `arx_args_list()`: |
| 39 | + ! `n_training` must be a strictly positive number. |
| 40 | + |
| 41 | +--- |
| 42 | + |
| 43 | + Code |
| 44 | + arx_args_list(n_training = 1.5) |
| 45 | + Condition |
| 46 | + Error in `arx_args_list()`: |
| 47 | + ! `n_training` must be a positive integer. |
| 48 | + |
| 49 | +--- |
| 50 | + |
| 51 | + Code |
| 52 | + arx_args_list(lags = c(-1, 0)) |
| 53 | + Condition |
| 54 | + Error in `arx_args_list()`: |
| 55 | + ! `lags` must be non-negative integers. |
| 56 | + |
| 57 | +--- |
| 58 | + |
| 59 | + Code |
| 60 | + arx_args_list(lags = list(c(1:5, 6.5), 2:8)) |
| 61 | + Condition |
| 62 | + Error in `arx_args_list()`: |
| 63 | + ! `lags` must be non-negative integers. |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | + Code |
| 68 | + arx_args_list(symmetrize = 4) |
| 69 | + Condition |
| 70 | + Error in `arx_args_list()`: |
| 71 | + ! `symmetrize` must be of type <logical>. |
| 72 | + |
| 73 | +--- |
| 74 | + |
| 75 | + Code |
| 76 | + arx_args_list(nonneg = 4) |
| 77 | + Condition |
| 78 | + Error in `arx_args_list()`: |
| 79 | + ! `nonneg` must be of type <logical>. |
| 80 | + |
| 81 | +--- |
| 82 | + |
| 83 | + Code |
| 84 | + arx_args_list(quantile_levels = -0.1) |
| 85 | + Condition |
| 86 | + Error in `arx_args_list()`: |
| 87 | + ! `quantile_levels` must lie in [0, 1]. |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | + Code |
| 92 | + arx_args_list(quantile_levels = 1.1) |
| 93 | + Condition |
| 94 | + Error in `arx_args_list()`: |
| 95 | + ! `quantile_levels` must lie in [0, 1]. |
| 96 | + |
| 97 | +--- |
| 98 | + |
| 99 | + Code |
| 100 | + arx_args_list(target_date = "2022-01-01") |
| 101 | + Condition |
| 102 | + Error in `arx_args_list()`: |
| 103 | + ! `target_date` must be a date. |
| 104 | + |
| 105 | +--- |
| 106 | + |
| 107 | + Code |
| 108 | + arx_args_list(n_training_min = "de") |
| 109 | + Condition |
| 110 | + Error in `arx_args_list()`: |
| 111 | + ! `...` must be empty. |
| 112 | + x Problematic argument: |
| 113 | + * n_training_min = "de" |
| 114 | + |
| 115 | +--- |
| 116 | + |
| 117 | + Code |
| 118 | + arx_args_list(epi_keys = 1) |
| 119 | + Condition |
| 120 | + Error in `arx_args_list()`: |
| 121 | + ! `...` must be empty. |
| 122 | + x Problematic argument: |
| 123 | + * epi_keys = 1 |
| 124 | + |
| 125 | +# arx forecaster disambiguates quantiles |
| 126 | + |
| 127 | + Code |
| 128 | + compare_quantile_args(alist, tlist) |
| 129 | + Condition |
| 130 | + Error in `compare_quantile_args()`: |
| 131 | + ! You have specified different, non-default, quantiles in the trainier and `arx_args` options. |
| 132 | + i Please only specify quantiles in one location. |
| 133 | + |
| 134 | +# arx_lags_validator handles named & unnamed lists as expected |
| 135 | + |
| 136 | + Code |
| 137 | + arx_lags_validator(pred_vec, lags_finit_fn_switch2) |
| 138 | + Condition |
| 139 | + Error in `arx_lags_validator()`: |
| 140 | + ! You have requested 2 predictor(s) but 3 different lags. |
| 141 | + i Lags must be a vector or a list with length == number of predictors. |
| 142 | + |
| 143 | +--- |
| 144 | + |
| 145 | + Code |
| 146 | + arx_lags_validator(pred_vec, lags_init_other_name) |
| 147 | + Condition |
| 148 | + Error in `arx_lags_validator()`: |
| 149 | + ! If lags is a named list, then all predictors must be present. |
| 150 | + i The predictors are `death_rate` and `case_rate`. |
| 151 | + i So lags is missing `case_rate`'. |
| 152 | + |
0 commit comments