tracking_get: Return page from tracking sheet as tibble

Description Usage Arguments Note Author(s) Examples

View source: R/tracking_get.R

Description

Reads user's Google Drive for a specified tracking sheet (currently one of "sdp", "hhf", "mnh", or nut"), and either of sheets therein (one of "new" or "updated"). Alternatively, the user may specify the URL of a page in any tracking sheet.

Usage

1
2
3
4
5
tracking_get(
  unit = c("sdp", "hhf", "mnh", "nut"),
  sheet = c("new", "updated"),
  url
)

Arguments

unit

Character: Must be "sdp", "hhf", "mnh", or "nut".

sheet

Optional: For units "sdp" or "hhf", user must specify "new" or "updated". Units "mnh" and "nut" have no updated vars at this time, so the sheet containing new variables will be imported automatically.

url

Optional: A url to the specific page on a Google Sheet. If provided, this will supersede other arguments.

Note

Access to Google Drive depends on user permissions, which must be refreshed as frequently as access token expires. A pop-up browser window requesting permission should appear when function is first called.

Author(s)

Matt Gunther

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Get the "new" sheet from the SDP tracking sheet
tracking_get("sdp", "new")

# Get the "updated" sheet from the SDP tracking sheet
tracking_get("sdp", "updated")

## End(Not run)

mgunther87/ipumsPMA documentation built on Aug. 1, 2020, 12:22 a.m.