# A valid spec
spec <- tibble(.name = "a", .value = "b", foo = 1)
check_pivot_spec(spec)
spec <- tibble(.name = "a")
try(check_pivot_spec(spec))
# `.name` and `.value` are forced to be the first two columns
spec <- tibble(foo = 1, .value = "b", .name = "a")
check_pivot_spec(spec)
Run the code above in your browser using DataLab