pd_rows: Rows of a dataset

View source: R/publicdataau.R

pd_rowsR Documentation

Rows of a dataset

Description

Reads rows from the query API. For a whole table, [pd_read()] or [pd_download()] is faster and has no rate limit.

Usage

pd_rows(
  slug,
  ...,
  .select = NULL,
  .order = NULL,
  .limit = NULL,
  .offset = NULL,
  .version = NULL,
  .all = FALSE
)

Arguments

slug

The dataset's slug, as in its page URL 'https://publicdata.au/d/<slug>/'.

...

Conditions, each a field name and a value or a filter such as 'year = pd_gte(2020)'. A vector of several values matches any of them and 'NA' matches a blank or suppressed cell. Every condition must match.

.select

Fields to return. Every field when 'NULL'.

.order

Fields to sort by, each '"field.asc"' or '"field.desc"'.

.limit

Rows per page, 1 to 10000.

.offset

Rows to skip.

.version

A version date from [pd_versions()]. Without it the answer comes from the newest version and changes when the publisher releases again; with it the answer never changes.

.all

Follow every page and return all matching rows.

Value

A tibble, with each column typed as its field says (dates as 'Date', booleans as logical) and labelled with the field's description. 'attr(x, "publicdata")' holds the version, licence and attribution the answer came with; see [pd_attribution()].

See Also

Other query: filters, pd_aggregate(), pd_connect(), pd_tbl()

Examples


pd_rows("au-road-deaths", state = "QLD", year = pd_gte(2024), .limit = 5)


publicdataau documentation built on Oct. 14, 2026, 5:07 p.m.