soql_limit: Limit the number of results from a SODA response

Description Usage Arguments Value References See Also Examples

View source: R/soql.R

Description

Adds a parameter to the SODA URL that limits how many responses the API will send back.

Usage

1
soql_limit(soql_list, limit)

Arguments

soql_list

The soql object. If you don't have one yet, use the soql() function first. This can be piped in.

limit

Number of records desired.

Value

Returns a new soql object, with a limit parameter added, for use in other functions.

References

Documentation on the SODA website

See Also

soql_offset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
if (require(magrittr)) {
  # With pipes
  my_url <- soql() %>%
    soql_limit(5) %>%
    as.character()
} else {
  # Without pipes
  soql_chain <- soql()
  soql_chain <- soql_limit(soql_chain, 5)
  my_url <- as.character(soql_chain)
}

soql documentation built on May 2, 2019, 8:50 a.m.