Skip to contents

Set helper values for the query (helps with readability)

Usage

spq_set(.query, ...)

Arguments

.query

query

...

Helper values and their definition.

Value

A query object

Some examples

# find the individuals of the species
spq_init() %>%
# dog, cat or chicken
spq_set(species = c('wd:Q144','wd:Q146', 'wd:Q780'), mayorcode = "wd:Q30185") %>%
spq_filter(mayor == wdt::P31(species)) %>%
spq_add("?mayor p:P39 ?node") %>%
# of mayor
spq_add("?node ps:P39 ?mayorcode") %>%
# of some places
spq_add("?node pq:P642 ?place") %>%
spq_label(species, mayor, place) %>%
spq_select(-species, -place, -node, -mayor, -mayorcode) %>%
spq_perform()