Fixing variable names in R package example.

This commit is contained in:
Egeler, Paul W 2018-06-03 16:46:25 -04:00
parent 50e0496d8c
commit 2cf5c8e019
2 changed files with 22 additions and 22 deletions

View File

@ -14,23 +14,23 @@
#' \dontrun{
#' library(RCurl)
#'
#' # Get the metadata
#' result.meta <- postForm(
#' api_url,
#' token = api_token,
#' content = 'metadata',
#' format = 'json'
#' )
#'
#' # Get the records
#' result.record <- postForm(
#' uri = api_url,
#' token = api_token,
#' records <- postForm(
#' uri = api_url, # Supply your site-specific URI
#' token = api_token, # Supply your own API token
#' content = 'record',
#' format = 'json',
#' returnFormat = 'json'
#' )
#'
#' # Get the metadata
#' metadata <- postForm(
#' uri = api_url,
#' token = api_token,
#' content = 'metadata',
#' format = 'json'
#' )
#'
#' # Convert exported JSON strings into a list of data.frames
#' REDCap_split(records, metadata)
#' }

View File

@ -27,23 +27,23 @@ is used to determine which fields should be included in each resultant table.
\dontrun{
library(RCurl)
# Get the metadata
result.meta <- postForm(
api_url,
token = api_token,
content = 'metadata',
format = 'json'
)
# Get the records
result.record <- postForm(
uri = api_url,
token = api_token,
records <- postForm(
uri = api_url, # Supply your site-specific URI
token = api_token, # Supply your own API token
content = 'record',
format = 'json',
returnFormat = 'json'
)
# Get the metadata
metadata <- postForm(
uri = api_url,
token = api_token,
content = 'metadata',
format = 'json'
)
# Convert exported JSON strings into a list of data.frames
REDCap_split(records, metadata)
}