Unable to use names_glue within pivot_wider() when the only unique value is NA - the same code does not cause any problems when lazy_dt() is not used.
example <- fish_encounters %>%
mutate(test = NA_integer_) %>%
lazy_dt() %>%
pivot_wider(.,
names_glue = "{test}",
names_from = test,
values_from = seen,
names_repair = 'minimal') %>%
collect()

names_glue does work, if there are other values available in names (for example using the station variable). Using a variable with only NA does seem to be possible but only if names_glue is not used at all.
example <- fish_encounters %>%
mutate(test = NA_integer_) %>%
lazy_dt() %>%
pivot_wider(.,
names_glue = "{station}",
names_from = station,
values_from = seen,
names_repair = 'minimal') %>%
collect()
Unable to use names_glue within pivot_wider() when the only unique value is NA - the same code does not cause any problems when lazy_dt() is not used.
names_glue does work, if there are other values available in names (for example using the station variable). Using a variable with only NA does seem to be possible but only if names_glue is not used at all.