read_abs_series()
is a wrapper around read_abs()
, with series_id
as
the first argument.
read_abs()
downloads spreadsheet(s) from the ABS containing time
series data. These files need to be saved somewhere on your disk.
This local directory can be controlled using the path
argument to
read_abs()
. If the path
argument is not set, read_abs()
will store
the files in a directory set in the "R_READABS_PATH" environment variable.
If this variable isn't set, files will be saved in a temporary directory.
To check the value of the "R_READABS_PATH" variable, run
Sys.getenv("R_READABS_PATH")
. You can set the value of this variable
for a single session using Sys.setenv(R_READABS_PATH = <path>)
.
If you would like to change this variable for all future R sessions, edit
your .Renviron
file and add R_READABS_PATH = <path>
line.
The easiest way to edit this file is using usethis::edit_r_environ()
.
Certain corporate networks restrict your ability to download files in an R
session. On some of these networks, the "wininet"
method must be used when
downloading files. Users can now specify the method that will be used to
download files by setting the "R_READABS_DL_METHOD"
environment variable.
For example, the following code sets the environment variable for your
current session: sSys.setenv("R_READABS_DL_METHOD" = "wininet")
You can add R_READABS_DL_METHOD = "wininet"
to your .Renviron to have
this persist across sessions.
The release_date
argument allows you to download table(s) other than the
latest release. This is useful for examining revisions to time series, or
for obtaining the version of series that were available on a given date.
Note that you cannot supply more than one date to release_date
. Note also
that any dates prior to mid-2019 (the exact date varies by series) will fail.
Specifying release_date
only reliably works for monthly, and some
quarterly, data. It does not work for annual data.