glitter
glitter copied to clipboard
spq_set(var) and spq_label(var, .overwrite=TRUE) cannot work together
For instance:
country_id="wd:Q148"
result=spq_init() %>%
spq_set(country=country_id) %>%
spq_add("?country wdt:P37 ?language_official") %>%
spq_add("?language_official wdt:P424 ?language_official_code") %>%
spq_label(country,language_official, .overwrite=TRUE) %>%
spq_perform(replace_prefixes=TRUE)
result has 0 rows
whereas the same query, without the .overwrite=TRUE option does return a result (1 row). Maybe just thow a warning when using spq_set(var) + spq_label(var, .overwrite=TRUE)?