|
12 | 12 | encode_unit(prune_method(), 13, direction = "forward") |
13 | 13 | Condition |
14 | 14 | Error in `encode_unit()`: |
15 | | - ! `value` should be a character vector. |
| 15 | + ! `value` must be a character vector, not the number 13. |
16 | 16 |
|
17 | 17 | # to [0, 1] for quantitative values |
18 | 18 |
|
19 | 19 | Code |
20 | 20 | encode_unit(penalty(), "penalty", direction = "forward") |
21 | 21 | Condition |
22 | 22 | Error in `encode_unit()`: |
23 | | - ! `value` should be a numeric vector. |
| 23 | + ! `value` must be a numeric vector, not the string "penalty". |
24 | 24 |
|
25 | 25 | # encode_unit validates original argument |
26 | 26 |
|
|
36 | 36 | encode_unit("foo") |
37 | 37 | Condition |
38 | 38 | Error in `encode_unit()`: |
39 | | - ! `x` should be a dials parameter object, not a string. |
| 39 | + ! `x` must be a dials parameter object, not the string "foo". |
40 | 40 |
|
41 | 41 | --- |
42 | 42 |
|
43 | 43 | Code |
44 | 44 | encode_unit(2, prune_method()$values, direction = "forward") |
45 | 45 | Condition |
46 | 46 | Error in `encode_unit()`: |
47 | | - ! `x` should be a dials parameter object, not a string. |
| 47 | + ! `x` must be a dials parameter object, not the number 2. |
48 | 48 |
|
49 | 49 | --- |
50 | 50 |
|
|
61 | 61 | encode_unit(x, prune_method()$values, direction = "forward") |
62 | 62 | Condition |
63 | 63 | Error in `encode_unit()`: |
64 | | - ! `value` should be a numeric vector. |
| 64 | + ! `value` must be a numeric vector, not a character vector. |
65 | 65 |
|
66 | 66 | --- |
67 | 67 |
|
68 | 68 | Code |
69 | 69 | encode_unit(z, 1, direction = "forward") |
70 | 70 | Condition |
71 | 71 | Error in `encode_unit()`: |
72 | | - ! `value` should be a character vector. |
| 72 | + ! `value` must be a character vector, not the number 1. |
73 | 73 |
|
74 | 74 | --- |
75 | 75 |
|
76 | 76 | Code |
77 | 77 | encode_unit(x, matrix(letters[1:4], ncol = 2), direction = "forward") |
78 | 78 | Condition |
79 | 79 | Error in `encode_unit()`: |
80 | | - ! `value` should be a numeric vector. |
| 80 | + ! `value` must be a numeric vector, not a character matrix. |
81 | 81 |
|
82 | 82 | --- |
83 | 83 |
|
84 | 84 | Code |
85 | 85 | encode_unit(x, matrix(1:4, ncol = 2), direction = "forward") |
86 | 86 | Condition |
87 | 87 | Error in `encode_unit()`: |
88 | | - ! `value` should be a numeric vector. |
| 88 | + ! `value` must be a numeric vector, not an integer matrix. |
89 | 89 |
|
90 | 90 | --- |
91 | 91 |
|
92 | 92 | Code |
93 | 93 | encode_unit(z, matrix(1:4, ncol = 2), direction = "forward") |
94 | 94 | Condition |
95 | 95 | Error in `encode_unit()`: |
96 | | - ! `value` should be a character vector. |
| 96 | + ! `value` must be a character vector, not an integer matrix. |
97 | 97 |
|
98 | 98 | --- |
99 | 99 |
|
100 | 100 | Code |
101 | 101 | encode_unit(z, matrix(letters[1:4], ncol = 2), direction = "forward") |
102 | 102 | Condition |
103 | 103 | Error in `encode_unit()`: |
104 | | - ! `value` should be a character vector. |
| 104 | + ! `value` must be a character vector, not a character matrix. |
105 | 105 |
|
106 | 106 | --- |
107 | 107 |
|
108 | 108 | Code |
109 | 109 | encode_unit(x, prune_method()$values, direction = "backward") |
110 | 110 | Condition |
111 | 111 | Error in `encode_unit()`: |
112 | | - ! `value` should be a numeric vector. |
| 112 | + ! `value` must be a numeric vector, not a character vector. |
113 | 113 |
|
114 | 114 | --- |
115 | 115 |
|
|
0 commit comments