spq_offset | R Documentation |
Offset the first generated result
spq_offset(.query, n = 5)
.query |
a list with elements of the query |
n |
the maximum number of lines to return |
A query object
spq_offset()
and spq_head()
are only useful when used with
spq_arrange()
that makes the order of results predictable.
# Return 42 items
spq_init() %>%
spq_add("?item wdt:P31 wd:Q5") %>%
spq_label(item) %>%
spq_add("?item wdt:P19/wdt:P131* wd:Q60") %>%
spq_add("?item wikibase:sitelinks ?linkcount") %>%
spq_arrange(desc(linkcount)) %>%
spq_head(n=42)
# Return 42 items after the first 11 items
spq_init() %>%
spq_add("?item wdt:P31 wd:Q5") %>%
spq_label(item) %>%
spq_add("?item wdt:P19/wdt:P131* wd:Q60") %>%
spq_add("?item wikibase:sitelinks ?linkcount") %>%
spq_arrange(desc(linkcount)) %>%
spq_head(42) %>%
spq_offset(11)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.