| 1 | # last_col() checks its inputs |
| 2 | |
| 3 | Code |
| 4 | last_col(Inf, letters[1:3]) |
| 5 | Condition |
| 6 | Error in `last_col()`: |
| 7 | ! `offset` (Inf) must be smaller than the number of columns (3). |
| 8 | Code |
| 9 | last_col(3, letters[1:3]) |
| 10 | Condition |
| 11 | Error in `last_col()`: |
| 12 | ! `offset` (3) must be smaller than the number of columns (3). |
| 13 | Code |
| 14 | last_col(0, character()) |
| 15 | Condition |
| 16 | Error in `last_col()`: |
| 17 | ! Can't select last column when input is empty. |
| 18 | Code |
| 19 | last_col(1:2, letters[1:3]) |
| 20 | Condition |
| 21 | Error in `last_col()`: |
| 22 | ! `offset` must be a single integer, not an integer vector. |
| 23 |