mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-21 21:10:22 +01:00
fix to allow actual project naming
This commit is contained in:
parent
28dc2ba09e
commit
385973e8da
@ -21,19 +21,19 @@ get_api_key <- function(key.name) {
|
|||||||
#' @param project.name The name of the current project (for key storage with
|
#' @param project.name The name of the current project (for key storage with
|
||||||
#' `keyring::key_set()`)
|
#' `keyring::key_set()`)
|
||||||
#' @param widen.data argument to widen the exported data
|
#' @param widen.data argument to widen the exported data
|
||||||
|
#' @param uri REDCap database API uri
|
||||||
#' @param ... arguments passed on to `REDCapCAST::read_redcap_tables()`
|
#' @param ... arguments passed on to `REDCapCAST::read_redcap_tables()`
|
||||||
#'
|
#'
|
||||||
#' @return data.frame or list depending on widen.data
|
#' @return data.frame or list depending on widen.data
|
||||||
#' @importFrom purrr reduce
|
#' @importFrom purrr reduce
|
||||||
#' @importFrom dplyr left_join
|
#' @importFrom dplyr left_join
|
||||||
#' @export
|
#' @export
|
||||||
easy_redcap <- function(project.name, widen.data = TRUE, ...) {
|
easy_redcap <- function(project.name, widen.data = TRUE, uri, ...) {
|
||||||
project.name <- "ENIGMA"
|
|
||||||
|
|
||||||
key <- get_api_key(key.name = paste0(project.name, "_REDCAP_API"))
|
key <- get_api_key(key.name = paste0(project.name, "_REDCAP_API"))
|
||||||
|
|
||||||
out <- read_redcap_tables(
|
out <- read_redcap_tables(
|
||||||
token = key,
|
token = key,
|
||||||
|
uri = uri,
|
||||||
...
|
...
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
\alias{easy_redcap}
|
\alias{easy_redcap}
|
||||||
\title{Secure API key storage and data acquisition in one}
|
\title{Secure API key storage and data acquisition in one}
|
||||||
\usage{
|
\usage{
|
||||||
easy_redcap(project.name, widen.data = TRUE, ...)
|
easy_redcap(project.name, widen.data = TRUE, uri, ...)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{project.name}{The name of the current project (for key storage with
|
\item{project.name}{The name of the current project (for key storage with
|
||||||
@ -12,6 +12,8 @@ easy_redcap(project.name, widen.data = TRUE, ...)
|
|||||||
|
|
||||||
\item{widen.data}{argument to widen the exported data}
|
\item{widen.data}{argument to widen the exported data}
|
||||||
|
|
||||||
|
\item{uri}{REDCap database API uri}
|
||||||
|
|
||||||
\item{...}{arguments passed on to `REDCapCAST::read_redcap_tables()`}
|
\item{...}{arguments passed on to `REDCapCAST::read_redcap_tables()`}
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
|
Loading…
Reference in New Issue
Block a user