mirror of
https://github.com/agdamsbo/stRoke.git
synced 2024-11-21 20:40:22 +01:00
REDCapRITS moved to Suggests
This commit is contained in:
parent
891a8e246d
commit
48120cad4b
@ -13,21 +13,23 @@ Roxygen: list(markdown = TRUE)
|
||||
RoxygenNote: 7.2.3
|
||||
LazyData: true
|
||||
Suggests:
|
||||
REDCapRITS (>= 0.2.2.1),
|
||||
remotes,
|
||||
spelling,
|
||||
testthat (>= 3.0.0)
|
||||
Language: en-US
|
||||
Config/testthat/edition: 3
|
||||
Imports:
|
||||
cli,
|
||||
dplyr,
|
||||
ggplot2,
|
||||
gtsummary,
|
||||
MASS,
|
||||
rankinPlot,
|
||||
REDCapR,
|
||||
REDCapRITS (>= 0.2.2),
|
||||
stats,
|
||||
tidyr
|
||||
Depends:
|
||||
R (>= 2.10)
|
||||
Remotes:
|
||||
Remotes:
|
||||
agdamsbo/REDCapRITS/R
|
||||
|
@ -14,8 +14,6 @@ export(read_redcap_tables)
|
||||
export(source_lines)
|
||||
import(ggplot2)
|
||||
importFrom(MASS,polr)
|
||||
importFrom(REDCapR,redcap_read)
|
||||
importFrom(REDCapRITS,REDCap_split)
|
||||
importFrom(dplyr,mutate)
|
||||
importFrom(dplyr,select)
|
||||
importFrom(gtsummary,add_overall)
|
||||
|
@ -12,9 +12,6 @@
|
||||
#'
|
||||
#' @return list of instruments
|
||||
#' @export
|
||||
#'
|
||||
#' @importFrom REDCapR redcap_read
|
||||
#' @importFrom REDCapRITS REDCap_split
|
||||
#'
|
||||
#' @examples
|
||||
#' # Examples will be provided later
|
||||
@ -26,6 +23,15 @@ read_redcap_tables <- function(uri,
|
||||
forms=NULL,
|
||||
generics=c("record_id", "redcap_event_name", "redcap_repeat_instrument", "redcap_repeat_instance")){
|
||||
|
||||
if (requireNamespace("REDCapRITS", quietly = FALSE)) {
|
||||
cli::cli_abort(
|
||||
c("x" = "The package REDCapRITS is not installed.",
|
||||
"i" = "Please install REDCapRITS by running \"remotes::install_github('agdamsbo/REDCapRITS/R')\".")
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
# Notes to self: Based on the metadata, this functionality could be introduced without using the REDCapRITS package.. To be tried..
|
||||
|
||||
d <- REDCapR::redcap_read (redcap_uri = uri,
|
||||
|
Loading…
Reference in New Issue
Block a user