I'd prefer to check `length(col) == 1 || length(col) == nrow(data)` - I think other recycling is error-prone and best avoided.