Learn R Programming

soql (version 0.1.1)

soql_simple_filter: Create a simple equality filter

Description

This function adds a parameter to the URL to filter records in a simple way, using equality only. For more advanced filters, see soql_where.

Usage

soql_simple_filter(soql_list, column, value)

Arguments

soql_list
The soql object. If you don't have one yet, use the soql() function first. This can be piped in.
column
The column name to filter by.
value
The value the column must be equal to.

Value

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

References

Documentation on the SODA website

See Also

soql_where

Examples

Run this code
if (require(magrittr)) {
  # With pipes
  my_url <- soql() %>%
    soql_simple_filter("height", 50) %>%
    as.character()
} else {
  # Without pipes
  soql_chain <- soql()
  soql_chain <- soql_simple_filter(soql_chain, "height", 50)
  my_url <- as.character(soql_chain)
}

Run the code above in your browser using DataLab