Skip to contents

Return the most recent (current) value for an indicator

Usage

current(data, filter_with, print = TRUE)

Arguments

data

a dataframe of cleaned ABS Time Series data returned from readabs

filter_with

a list of variables to filter the dataframe on. Valid variables include gender, age, indicator, and series type.

print

logical. If TRUE (default) current() returns a string. Specify FALSE to return a number.

Value

String if print == TRUE. Number if print == FALSE

Examples

library(reportabs)
labour_force_briefing <- read_absdata("labour_force_briefing")
#> Reading labour_force_briefing file found in /tmp/RtmpU4AVXm
current(labour_force_briefing, list(indicator = "Employed total",
series_type = "Seasonally Adjusted"))
#> # A tibble: 27 × 7
#>    date       sex     state             series_type       unit  indicator  value
#>    <date>     <chr>   <chr>             <chr>             <chr> <chr>      <dbl>
#>  1 2025-08-01 Persons Australia         Seasonally Adjus… 000   Employed… 14627.
#>  2 2025-08-01 Persons New South Wales   Seasonally Adjus… 000   Employed…  4463.
#>  3 2025-08-01 Persons Victoria          Seasonally Adjus… 000   Employed…  3818.
#>  4 2025-08-01 Persons Queensland        Seasonally Adjus… 000   Employed…  2994.
#>  5 2025-08-01 Persons South Australia   Seasonally Adjus… 000   Employed…   981.
#>  6 2025-08-01 Persons Western Australia Seasonally Adjus… 000   Employed…  1640.
#>  7 2025-08-01 Persons Tasmania          Seasonally Adjus… 000   Employed…   287.
#>  8 2025-08-01 Males   Australia         Seasonally Adjus… 000   Employed…  7587.
#>  9 2025-08-01 Males   New South Wales   Seasonally Adjus… 000   Employed…  2316.
#> 10 2025-08-01 Males   Victoria          Seasonally Adjus… 000   Employed…  1976.
#> # ℹ 17 more rows