2023-02-28 09:54:03 +01:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/read_redcap_tables.R
|
|
|
|
\name{read_redcap_tables}
|
|
|
|
\alias{read_redcap_tables}
|
|
|
|
\title{Download REDCap data}
|
|
|
|
\usage{
|
|
|
|
read_redcap_tables(
|
|
|
|
uri,
|
|
|
|
token,
|
|
|
|
records = NULL,
|
|
|
|
fields = NULL,
|
|
|
|
events = NULL,
|
|
|
|
forms = NULL,
|
2024-11-28 14:32:03 +01:00
|
|
|
raw_or_label = c("raw", "label", "both"),
|
|
|
|
split_forms = "all",
|
|
|
|
...
|
2023-02-28 09:54:03 +01:00
|
|
|
)
|
|
|
|
}
|
|
|
|
\arguments{
|
2024-02-05 14:46:37 +01:00
|
|
|
\item{uri}{REDCap database API uri}
|
2023-02-28 09:54:03 +01:00
|
|
|
|
|
|
|
\item{token}{API token}
|
|
|
|
|
|
|
|
\item{records}{records to download}
|
|
|
|
|
|
|
|
\item{fields}{fields to download}
|
|
|
|
|
|
|
|
\item{events}{events to download}
|
|
|
|
|
|
|
|
\item{forms}{forms to download}
|
|
|
|
|
2024-11-28 14:32:03 +01:00
|
|
|
\item{raw_or_label}{raw or label tags. Can be "raw", "label" or "both".
|
2024-11-27 09:51:51 +01:00
|
|
|
|
2024-11-28 14:32:03 +01:00
|
|
|
* "raw": Standard \link[REDCapR]{redcap_read} method to get raw values.
|
|
|
|
* "label": Standard \link[REDCapR]{redcap_read} method to get label values.
|
2024-11-27 09:51:51 +01:00
|
|
|
* "both": Get raw values with REDCap labels applied as labels. Use
|
2024-11-28 14:32:03 +01:00
|
|
|
\link[REDCapCAST]{as_factor} to format factors with original labels and use
|
|
|
|
the `gtsummary` package functions like \link[gtsummary]{tbl_summary} to
|
|
|
|
easily get beautiful tables with original labels from REDCap. Use
|
|
|
|
\link[REDCapCAST]{fct_drop} to drop empty levels.}
|
2023-02-28 09:54:03 +01:00
|
|
|
|
2023-04-13 10:57:04 +02:00
|
|
|
\item{split_forms}{Whether to split "repeating" or "all" forms, default is
|
|
|
|
all.}
|
2024-11-28 14:32:03 +01:00
|
|
|
|
|
|
|
\item{...}{passed on to \link[REDCapR]{redcap_read}}
|
2023-02-28 09:54:03 +01:00
|
|
|
}
|
|
|
|
\value{
|
|
|
|
list of instruments
|
|
|
|
}
|
|
|
|
\description{
|
2024-11-28 14:32:03 +01:00
|
|
|
Implementation of passed on to \link[REDCapCAST]{REDCap_split} with a focused
|
|
|
|
data acquisition approach using passed on to \link[REDCapR]{redcap_read} and
|
|
|
|
only downloading specified fields, forms and/or events using the built-in
|
|
|
|
focused_metadata including some clean-up.
|
2024-01-09 10:22:49 +01:00
|
|
|
Works with classical and longitudinal projects with or without repeating
|
|
|
|
instruments.
|
2024-11-28 14:32:03 +01:00
|
|
|
Will preserve metadata in the data.frames as labels.
|
2023-02-28 09:54:03 +01:00
|
|
|
}
|
|
|
|
\examples{
|
|
|
|
# Examples will be provided later
|
|
|
|
}
|