From bbe3234a0ba739d237c96fd2d1979a7c09ff1085 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 11 Jun 2024 17:22:05 +0000 Subject: [PATCH] cli-40502-860 --- 404.html | 4 +- CONDUCT.html | 4 +- LICENSE-text.html | 4 +- LICENSE.html | 4 +- articles/BasicREDCapROperations.html | 218 +++---- articles/SecurityDatabase.html | 558 +++++++++--------- articles/TroubleshootingApiCalls.html | 124 ++-- articles/advanced-redcapr-operations.html | 192 +++--- articles/index.html | 4 +- articles/longitudinal-and-repeating.html | 206 +++---- articles/workflow-read.html | 165 +++--- articles/workflow-write.html | 77 ++- authors.html | 6 +- index.html | 11 +- news/index.html | 7 +- pkgdown.yml | 10 +- reference/REDCapR-package.html | 44 +- reference/collapse_vector.html | 4 +- reference/constant.html | 4 +- reference/create_batch_glossary.html | 9 +- reference/index.html | 21 +- reference/kernel_api.html | 6 +- reference/metadata_utilities.html | 6 +- reference/redcap_arm_export.html | 8 +- reference/redcap_column_sanitize.html | 4 +- reference/redcap_dag_read.html | 4 +- reference/redcap_delete.html | 4 +- reference/redcap_event_instruments.html | 4 +- reference/redcap_event_read.html | 4 +- reference/redcap_file_download_oneshot.html | 10 +- reference/redcap_file_upload_oneshot.html | 4 +- reference/redcap_instrument_download.html | 16 +- reference/redcap_instruments.html | 4 +- reference/redcap_log_read.html | 26 +- reference/redcap_metadata_coltypes.html | 12 +- reference/redcap_metadata_read.html | 10 +- reference/redcap_metadata_write.html | 6 +- reference/redcap_next_free_record_name.html | 40 +- reference/redcap_project.html | 36 +- reference/redcap_project_info_read.html | 28 +- reference/redcap_read.html | 35 +- reference/redcap_read_eav_oneshot.html | 10 +- reference/redcap_read_oneshot.html | 14 +- reference/redcap_read_oneshot_eav.html | 14 +- reference/redcap_report.html | 10 +- .../redcap_survey_link_export_oneshot.html | 4 +- reference/redcap_users_export.html | 24 +- reference/redcap_variables.html | 4 +- reference/redcap_version.html | 8 +- reference/redcap_write.html | 4 +- reference/redcap_write_oneshot.html | 4 +- reference/replace_nas_with_explicit.html | 4 +- reference/retrieve_credential.html | 9 +- reference/sanitize_token.html | 4 +- reference/to_api_array.html | 4 +- reference/validate.html | 9 +- 56 files changed, 1041 insertions(+), 1028 deletions(-) diff --git a/404.html b/404.html index 4813685c..9d6693de 100644 --- a/404.html +++ b/404.html @@ -12,7 +12,7 @@ - + @@ -106,7 +106,7 @@

Page not found (404)

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/CONDUCT.html b/CONDUCT.html index 302374a3..3386da1d 100644 --- a/CONDUCT.html +++ b/CONDUCT.html @@ -1,5 +1,5 @@ -Contributor Code of Conduct • REDCapRContributor Code of Conduct • REDCapR @@ -79,7 +79,7 @@

Contributor Code of Conduct

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/LICENSE-text.html b/LICENSE-text.html index 88907a94..f356aaba 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -1,5 +1,5 @@ -License • REDCapRLicense • REDCapR @@ -73,7 +73,7 @@

License

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/LICENSE.html b/LICENSE.html index d79a08e4..408d16d9 100644 --- a/LICENSE.html +++ b/LICENSE.html @@ -1,5 +1,5 @@ -MIT License • REDCapRMIT License • REDCapR @@ -77,7 +77,7 @@

MIT License

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/BasicREDCapROperations.html b/articles/BasicREDCapROperations.html index c5fe0f33..c8e2d7c2 100644 --- a/articles/BasicREDCapROperations.html +++ b/articles/BasicREDCapROperations.html @@ -12,7 +12,7 @@ - + @@ -86,7 +86,7 @@ +
+ds_all_rows_all_fields # Inspect the returned dataset
 #> # A tibble: 5 × 25
 #>   record_id name_first name_last address  telephone email dob          age   sex
 #>       <dbl> <chr>      <chr>     <chr>    <chr>     <chr> <date>     <dbl> <dbl>
@@ -165,7 +166,7 @@ 

Read a subset of the records
+
+#> 2 records and 25 columns were read from REDCap in 0.2 seconds.  The http status code was 200.

Read a subset of the fields @@ -196,7 +197,7 @@

Read a subset of the fields
+
+#> 5 records and 3 columns were read from REDCap in 0.2 seconds.  The http status code was 200.

Read a subset of records, conditioned on the values in some @@ -229,7 +230,7 @@

Re desired record_id values are 3 & 5. The second call to REDCap pulls all the columns, but only for the identified records.

-
+
 ######
 ## Step 1: First call to REDCap
 desired_fields_v3 <- c("record_id", "dob", "weight")
@@ -243,11 +244,12 @@ 

Re #> 3 instrument metadata records were read from REDCap in 0.1 seconds. The http status code was 200. #> 1 rows were read from REDCap in 0.1 seconds. The http status code was 200. #> 2 data access groups were read from REDCap in 0.1 seconds. The http status code was 200. -#> 5 records and 1 columns were read from REDCap in 0.1 seconds. The http status code was 200. -#> Starting to read 5 records at 2024-01-22 17:11:21.642398. +#> 5 records and 1 columns were read from REDCap in 0.2 seconds. The http status code was 200. +#> Starting to read 5 records at 2024-06-11 17:21:22.13694. #> Reading batch 1 of 1, with subjects 1 through 5 (ie, 5 unique subject records). -#> 5 records and 3 columns were read from REDCap in 0.1 seconds. The http status code was 200. - +#> 5 records and 3 columns were read from REDCap in 0.2 seconds. The http status code was 200.

+
+
 ds_some_fields_v3 #Examine the these three variables.
 #> # A tibble: 5 × 3
 #>   record_id dob        weight
@@ -256,8 +258,9 @@ 

Re #> 2 2 2003-03-10 1 #> 3 3 1934-04-09 80 #> 4 4 1952-11-02 54 -#> 5 5 1955-04-15 104 - +#> 5 5 1955-04-15 104

+
+
 ######
 ## Step 2: identify desired records, based on age & weight
 before_1960 <- (ds_some_fields_v3$dob <= as.Date("1960-01-01"))
@@ -265,8 +268,9 @@ 

Re desired_records_v3 <- ds_some_fields_v3[before_1960 & heavier_than_70_kg, ]$record_id desired_records_v3 #Peek at IDs of the identified records -#> [1] 3 5 - +#> [1] 3 5

+
+
 ######
 ## Step 3: second call to REDCap
 #Return only records that met the age & weight criteria.
@@ -276,15 +280,16 @@ 

Re records = desired_records_v3 )$data #> 24 variable metadata records were read from REDCap in 0.1 seconds. The http status code was 200. -#> The data dictionary describing 17 fields was read from REDCap in 0.1 seconds. The http status code was 200. +#> The data dictionary describing 17 fields was read from REDCap in 0.2 seconds. The http status code was 200. #> 3 instrument metadata records were read from REDCap in 0.1 seconds. The http status code was 200. #> 1 rows were read from REDCap in 0.1 seconds. The http status code was 200. #> 2 data access groups were read from REDCap in 0.1 seconds. The http status code was 200. -#> 2 records and 1 columns were read from REDCap in 0.1 seconds. The http status code was 200. -#> Starting to read 2 records at 2024-01-22 17:11:23.197094. +#> 2 records and 1 columns were read from REDCap in 0.2 seconds. The http status code was 200. +#> Starting to read 2 records at 2024-06-11 17:21:24.040968. #> Reading batch 1 of 1, with subjects 3 through 5 (ie, 2 unique subject records). -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. - +#> 2 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200.

+
+
 ds_some_rows_v3 #Examine the results.
 #> # A tibble: 2 × 25
 #>   record_id name_first name_last address  telephone email dob          age   sex
@@ -323,7 +328,7 @@ 

Additional Returned InformationThe elapsed_seconds measures the duration of the call. -
+
+
+#> [1] 1.750561

@@ -394,87 +400,85 @@

Session Information
#> ─ Session info ───────────────────────────────────────────────────────────────
 #>  setting  value
-#>  version  R version 4.3.2 (2023-10-31)
-#>  os       macOS Monterey 12.7.2
-#>  system   x86_64, darwin20
+#>  version  R version 4.4.0 (2024-04-24)
+#>  os       macOS Sonoma 14.5
+#>  system   aarch64, darwin20
 #>  ui       X11
 #>  language en
 #>  collate  en_US.UTF-8
 #>  ctype    en_US.UTF-8
 #>  tz       UTC
-#>  date     2024-01-22
-#>  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
+#>  date     2024-06-11
+#>  pandoc   3.1.11 @ /usr/local/bin/ (via rmarkdown)
 #> 
 #> ─ Packages ───────────────────────────────────────────────────────────────────
 #>  package     * version  date (UTC) lib source
-#>  backports     1.4.1    2021-12-13 [1] CRAN (R 4.3.0)
-#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.3.0)
-#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.3.0)
-#>  bslib         0.6.1    2023-11-28 [1] CRAN (R 4.3.0)
-#>  cachem        1.0.8    2023-05-01 [1] CRAN (R 4.3.0)
-#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.3.0)
-#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.3.0)
-#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.3.0)
-#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.3.0)
-#>  curl          5.2.0    2023-12-08 [1] CRAN (R 4.3.0)
-#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.3.0)
-#>  digest        0.6.34   2024-01-11 [1] CRAN (R 4.3.0)
-#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.3.0)
-#>  evaluate      0.23     2023-11-01 [1] CRAN (R 4.3.0)
-#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.3.0)
-#>  fastmap       1.1.1    2023-02-24 [1] CRAN (R 4.3.0)
-#>  fs            1.6.3    2023-07-20 [1] CRAN (R 4.3.0)
-#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.3.0)
-#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.3.0)
-#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.3.0)
-#>  htmltools     0.5.7    2023-11-03 [1] CRAN (R 4.3.0)
-#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.3.0)
-#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.3.0)
-#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.3.0)
-#>  kableExtra    1.3.4    2021-02-20 [1] CRAN (R 4.3.0)
-#>  knitr       * 1.45     2023-10-30 [1] CRAN (R 4.3.0)
-#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.3.0)
-#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.3.0)
-#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.3.0)
-#>  munsell       0.5.0    2018-06-12 [1] CRAN (R 4.3.0)
-#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.3.0)
-#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.3.0)
-#>  pkgdown       2.0.7    2022-12-14 [1] CRAN (R 4.3.0)
-#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.3.0)
-#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.3.0)
-#>  ragg          1.2.7    2023-12-11 [1] CRAN (R 4.3.0)
-#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.3.0)
-#>  REDCapR     * 1.1.9005 2024-01-22 [1] local
-#>  rlang         1.1.3    2024-01-10 [1] CRAN (R 4.3.0)
-#>  rmarkdown     2.25     2023-09-18 [1] CRAN (R 4.3.0)
-#>  rstudioapi    0.15.0   2023-07-07 [1] CRAN (R 4.3.0)
-#>  rvest         1.0.3    2022-08-19 [1] CRAN (R 4.3.0)
-#>  sass          0.4.8    2023-12-06 [1] CRAN (R 4.3.0)
-#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.3.0)
-#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.3.0)
-#>  stringi       1.8.3    2023-12-11 [1] CRAN (R 4.3.0)
-#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.3.0)
-#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.3.0)
-#>  systemfonts   1.0.5    2023-10-09 [1] CRAN (R 4.3.0)
-#>  textshaping   0.3.7    2023-10-09 [1] CRAN (R 4.3.0)
-#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.3.0)
-#>  tidyselect    1.2.0    2022-10-10 [1] CRAN (R 4.3.0)
-#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.3.0)
-#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.3.0)
-#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.3.0)
-#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.3.0)
-#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.3.0)
-#>  webshot       0.5.5    2023-06-26 [1] CRAN (R 4.3.0)
-#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.3.0)
-#>  xfun          0.41     2023-11-01 [1] CRAN (R 4.3.0)
-#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.3.0)
-#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.3.0)
+#>  backports     1.5.0    2024-05-23 [1] CRAN (R 4.4.0)
+#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.4.0)
+#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.4.0)
+#>  bslib         0.7.0    2024-03-29 [1] CRAN (R 4.4.0)
+#>  cachem        1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
+#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.4.0)
+#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.4.0)
+#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.4.0)
+#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.4.0)
+#>  curl          5.2.1    2024-03-01 [1] CRAN (R 4.4.0)
+#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.4.0)
+#>  digest        0.6.35   2024-03-11 [1] CRAN (R 4.4.0)
+#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
+#>  evaluate      0.24.0   2024-06-10 [1] CRAN (R 4.4.0)
+#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
+#>  fastmap       1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  fs            1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
+#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
+#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
+#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
+#>  htmltools     0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
+#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.4.0)
+#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.4.0)
+#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
+#>  kableExtra    1.4.0    2024-01-24 [1] CRAN (R 4.4.0)
+#>  knitr       * 1.47     2024-05-29 [1] CRAN (R 4.4.0)
+#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
+#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
+#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
+#>  munsell       0.5.1    2024-04-01 [1] CRAN (R 4.4.0)
+#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
+#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
+#>  pkgdown       2.0.9    2024-04-18 [1] CRAN (R 4.4.0)
+#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
+#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
+#>  ragg          1.3.2    2024-05-15 [1] CRAN (R 4.4.0)
+#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
+#>  REDCapR     * 1.1.9005 2024-06-11 [1] local
+#>  rlang         1.1.4    2024-06-04 [1] CRAN (R 4.4.0)
+#>  rmarkdown     2.27     2024-05-17 [1] CRAN (R 4.4.0)
+#>  rstudioapi    0.16.0   2024-03-24 [1] CRAN (R 4.4.0)
+#>  sass          0.4.9    2024-03-15 [1] CRAN (R 4.4.0)
+#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.4.0)
+#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
+#>  stringi       1.8.4    2024-05-06 [1] CRAN (R 4.4.0)
+#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.4.0)
+#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.4.0)
+#>  systemfonts   1.1.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  textshaping   0.4.0    2024-05-24 [1] CRAN (R 4.4.0)
+#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
+#>  tidyselect    1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
+#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
+#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
+#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
+#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.4.0)
+#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.4.0)
+#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
+#>  xfun          0.44     2024-05-15 [1] CRAN (R 4.4.0)
+#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.4.0)
+#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.4.0)
 #> 
 #>  [1] /Users/runner/work/_temp/Library
-#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
+#>  [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
 #> 
 #> ──────────────────────────────────────────────────────────────────────────────
-

Report rendered by runner at 2024-01-22, 17:11 +0000 in 12 +

Report rendered by runner at 2024-06-11, 17:21 +0000 in 12 seconds.

@@ -496,7 +500,7 @@

Session Information

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/SecurityDatabase.html b/articles/SecurityDatabase.html index b6b1df83..24ced164 100644 --- a/articles/SecurityDatabase.html +++ b/articles/SecurityDatabase.html @@ -12,7 +12,7 @@ - + @@ -86,7 +86,7 @@

Create user credentials to the auxiliary database @@ -208,80 +208,80 @@

Create user credentia ‘redcap_private’ schema. Typical users should not be authorized for this schema. The current system allows typical users to view only their own tokens.

-
-----------------------------------------------------------------------
--- Add a user account to the auxiliary_security database so that they can query the tables to retrieve their API.
--- Notice that this only gives the permissions to retrieve the token.  You must still:
---   1) grant them API privileges to each appropriate REDCap project, and
---   2) copy the API from the REDCap database into the  auxiliary_security database.
--- Also, do not give typical users authorization for the 'redcap_private' schema.  The current system allows them to view only their own tokens.
------------------------------------------------------------------------
-
--- STEP #1: Declare the user name.  If everything runs correctly, this should be the only piece of code that you need to modify.
-print 'Step #1 executing....'
-USE [master]
-GO
-DECLARE @qualified_user_name varchar(255); SET @qualified_user_name = '[OUHSC\lsuarez3]'
-print 'Resulting login name: ' + @qualified_user_name; print ''
-
---EXEC sp_helplogins @LoginNamePattern=@qualified_user_name
---SELECT * FROM master..syslogins WHERE name = @qualified_user_name
---SELECT * FROM auxiliary_security.sys.sysusers
---SELECT * FROM sys.database_permissions
---SELECT * FROM sys.server_principals
-
------------------------------------------------------------------------
--- STEP #2: Create a login for the *server*.
-print 'Step #2 executing....'
-DECLARE @sql_create_login nvarchar(max)
-SET @sql_create_login = 'CREATE LOGIN ' + @qualified_user_name + ' FROM WINDOWS WITH DEFAULT_DATABASE=[auxiliary_security]'
-EXECUTE sp_executesql @sql_create_login
-DECLARE @login_count AS INT; SET @login_count = (SELECT COUNT(*) AS login_count FROM master..syslogins WHERE '[' + loginname + ']' = @qualified_user_name)
-print 'Logins matching desired name should equal 1.  It equals: ' + CONVERT(varchar, @login_count); print ''
-
------------------------------------------------------------------------
--- STEP #3: Create a user account for the *database*, after switching the database under focus to auxiliary_security.
-print 'Step #3 executing....'
-USE [auxiliary_security]
-DECLARE @sql_create_user nvarchar(max)
-SET @sql_create_user = 'CREATE USER ' + @qualified_user_name + ' FOR LOGIN ' + @qualified_user_name
-EXECUTE sp_executesql @sql_create_user
-DECLARE @user_count AS INT; SET @user_count = (SELECT COUNT(*) AS user_count FROM auxiliary_security.sys.sysusers WHERE '[' + name + ']' = @qualified_user_name)
-print 'User accounts matching desired name should equal 1.  It equals: ' + CONVERT(varchar, @user_count); print ''
-
------------------------------------------------------------------------
--- STEP #4: Grant appropriate privileges for the 'redcap' schema.
-print 'Step #4 executing....'
-DECLARE @sql_grant_schema_redcap nvarchar(max)
-SET @sql_grant_schema_redcap = 'GRANT EXECUTE ON SCHEMA::[redcap] TO ' + @qualified_user_name
-EXECUTE sp_executesql @sql_grant_schema_redcap
-print 'Step #4 executed'; print ''
-
------------------------------------------------------------------------
--- STEP #5: Grant appropriate privileges for the 'Security' schema.
-print 'Step #5 executing....'
-DECLARE @sql_grant_schema_security nvarchar(max)
-SET @sql_grant_schema_security = 'GRANT EXECUTE ON SCHEMA::[security] TO ' + @qualified_user_name
-EXECUTE sp_executesql @sql_grant_schema_security
-print 'Step #5 executed'; print ''
-
------------------------------------------------------------------------
--- OPTIONAL STEP: Delete the user from the database (the first line) and then the server (the second line).
--- The person's other database user accounts (besides with the auxiliary_security database) will NOT be automatically deleted by these two lines.
---USE [auxiliary_security]; DROP USER [OUHSC\lsuarez3]
---USE [master]; DROP LOGIN [OUHSC\lsuarez3]
-
------------------------------------------------------------------------
--- REFERENCES & NOTES
-  --The @qualified_user_name must have both (a) the 'OUHSC' domain qualification, and (b) the square brackets (to escape the backslash).
-  --Using sp_executesql to add users: https://www.sqlservercentral.com/Forums/Topic497615-359-1.aspx
-  --Check if a server login exists: https://stackoverflow.com/questions/37275/sql-query-for-logins
-  --Retrieve database users: https://stackoverflow.com/questions/2445444/how-to-get-a-list-of-users-for-all-instances-databases
-  --Concatenating strings: https://blog.sqlauthority.com/2010/11/25/sql-server-concat-function-in-sql-server-sql-concatenation/
-  --DROP USER from database: https://msdn.microsoft.com/en-us/library/ms189438.aspx
-  --DROP LOGIN from server: https://msdn.microsoft.com/en-us/library/ms188012.aspx
-  --Declaring variables (eg, the username above): https://technet.microsoft.com/en-us/library/aa258839.aspx
-  --A different (& non-dynamic) way to establish a user: https://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/index.jsp?topic=%2Fcom.ibm.wbpm.imuc.sbpm.doc%2Ftopics%2Fdb_create_users_nd_aix.html
-  --If the variable has to cross a 'GO' (which the current version of the script doesn't need): https://stackoverflow.com/questions/937336/is-there-a-way-to-persist-a-variable-across-a-go
+
-----------------------------------------------------------------------
+-- Add a user account to the auxiliary_security database so that they can query the tables to retrieve their API.
+-- Notice that this only gives the permissions to retrieve the token.  You must still:
+--   1) grant them API privileges to each appropriate REDCap project, and
+--   2) copy the API from the REDCap database into the  auxiliary_security database.
+-- Also, do not give typical users authorization for the 'redcap_private' schema.  The current system allows them to view only their own tokens.
+-----------------------------------------------------------------------
+
+-- STEP #1: Declare the user name.  If everything runs correctly, this should be the only piece of code that you need to modify.
+print 'Step #1 executing....'
+USE [master]
+GO
+DECLARE @qualified_user_name varchar(255); SET @qualified_user_name = '[OUHSC\lsuarez3]'
+print 'Resulting login name: ' + @qualified_user_name; print ''
+
+--EXEC sp_helplogins @LoginNamePattern=@qualified_user_name
+--SELECT * FROM master..syslogins WHERE name = @qualified_user_name
+--SELECT * FROM auxiliary_security.sys.sysusers
+--SELECT * FROM sys.database_permissions
+--SELECT * FROM sys.server_principals
+
+-----------------------------------------------------------------------
+-- STEP #2: Create a login for the *server*.
+print 'Step #2 executing....'
+DECLARE @sql_create_login nvarchar(max)
+SET @sql_create_login = 'CREATE LOGIN ' + @qualified_user_name + ' FROM WINDOWS WITH DEFAULT_DATABASE=[auxiliary_security]'
+EXECUTE sp_executesql @sql_create_login
+DECLARE @login_count AS INT; SET @login_count = (SELECT COUNT(*) AS login_count FROM master..syslogins WHERE '[' + loginname + ']' = @qualified_user_name)
+print 'Logins matching desired name should equal 1.  It equals: ' + CONVERT(varchar, @login_count); print ''
+
+-----------------------------------------------------------------------
+-- STEP #3: Create a user account for the *database*, after switching the database under focus to auxiliary_security.
+print 'Step #3 executing....'
+USE [auxiliary_security]
+DECLARE @sql_create_user nvarchar(max)
+SET @sql_create_user = 'CREATE USER ' + @qualified_user_name + ' FOR LOGIN ' + @qualified_user_name
+EXECUTE sp_executesql @sql_create_user
+DECLARE @user_count AS INT; SET @user_count = (SELECT COUNT(*) AS user_count FROM auxiliary_security.sys.sysusers WHERE '[' + name + ']' = @qualified_user_name)
+print 'User accounts matching desired name should equal 1.  It equals: ' + CONVERT(varchar, @user_count); print ''
+
+-----------------------------------------------------------------------
+-- STEP #4: Grant appropriate privileges for the 'redcap' schema.
+print 'Step #4 executing....'
+DECLARE @sql_grant_schema_redcap nvarchar(max)
+SET @sql_grant_schema_redcap = 'GRANT EXECUTE ON SCHEMA::[redcap] TO ' + @qualified_user_name
+EXECUTE sp_executesql @sql_grant_schema_redcap
+print 'Step #4 executed'; print ''
+
+-----------------------------------------------------------------------
+-- STEP #5: Grant appropriate privileges for the 'Security' schema.
+print 'Step #5 executing....'
+DECLARE @sql_grant_schema_security nvarchar(max)
+SET @sql_grant_schema_security = 'GRANT EXECUTE ON SCHEMA::[security] TO ' + @qualified_user_name
+EXECUTE sp_executesql @sql_grant_schema_security
+print 'Step #5 executed'; print ''
+
+-----------------------------------------------------------------------
+-- OPTIONAL STEP: Delete the user from the database (the first line) and then the server (the second line).
+-- The person's other database user accounts (besides with the auxiliary_security database) will NOT be automatically deleted by these two lines.
+--USE [auxiliary_security]; DROP USER [OUHSC\lsuarez3]
+--USE [master]; DROP LOGIN [OUHSC\lsuarez3]
+
+-----------------------------------------------------------------------
+-- REFERENCES & NOTES
+  --The @qualified_user_name must have both (a) the 'OUHSC' domain qualification, and (b) the square brackets (to escape the backslash).
+  --Using sp_executesql to add users: https://www.sqlservercentral.com/Forums/Topic497615-359-1.aspx
+  --Check if a server login exists: https://stackoverflow.com/questions/37275/sql-query-for-logins
+  --Retrieve database users: https://stackoverflow.com/questions/2445444/how-to-get-a-list-of-users-for-all-instances-databases
+  --Concatenating strings: https://blog.sqlauthority.com/2010/11/25/sql-server-concat-function-in-sql-server-sql-concatenation/
+  --DROP USER from database: https://msdn.microsoft.com/en-us/library/ms189438.aspx
+  --DROP LOGIN from server: https://msdn.microsoft.com/en-us/library/ms188012.aspx
+  --Declaring variables (eg, the username above): https://technet.microsoft.com/en-us/library/aa258839.aspx
+  --A different (& non-dynamic) way to establish a user: https://pic.dhe.ibm.com/infocenter/dmndhelp/v8r5m0/index.jsp?topic=%2Fcom.ibm.wbpm.imuc.sbpm.doc%2Ftopics%2Fdb_create_users_nd_aix.html
+  --If the variable has to cross a 'GO' (which the current version of the script doesn't need): https://stackoverflow.com/questions/937336/is-there-a-way-to-persist-a-variable-across-a-go

Transfer Credentials @@ -297,161 +297,161 @@

Transfer Credentials
rm(list=ls(all=TRUE)) #Clear the memory for any variables set from any previous runs.
-
-# ---- load-sources ------------------------------------------------------------
-
-# ---- load-packages -----------------------------------------------------------
-if (!require(OuhscMunge))
-  stop('The `OuhscMunge` package needs to be installed with `remotes::install_github("OuhscBbmc/OuhscMunge")`.')
-
-testit::assert(
-  "The `OuhscMunge` package should meet a minimal version.",
-  compareVersion( as.character(packageVersion("OuhscMunge")), "0.1.9.9009") >= 0L
-)
-
-library(magrittr)
-requireNamespace("DBI")
-requireNamespace("odbc")
-requireNamespace("dplyr")
-requireNamespace("readr")
-requireNamespace("tibble")
-requireNamespace("testit")
-requireNamespace("checkmate")
-requireNamespace("OuhscMunge")  # remotes::install_github("OuhscBbmc/OuhscMunge")
-
-
-# ---- declare-globals ---------------------------------------------------------
-# This file assume your campus has two REDCap instances.
-# Modify each (a) database name, (b) REDCap URL, and (c) DSN name.
-
-name_production <- "production"
-name_dev        <- "dev"
-
-uri_production  <- "https://redcap-production.ouhsc.edu/redcap/api/",
-uri_dev         <- "https://redcap-dev.ouhsc.edu/redcap/api/"
-
-dsn_production  <- "redcap-production"
-dsn_dev         <- "redcap-dev"
-dsn_source      <- "auxiliary_security" # The DSN of the token server.
-
-# The Activity Directory name that should precede each username.
-#   This should correspond with the result of SQL Server's `SYSTEM_USER` function
-#   (https://msdn.microsoft.com/en-us/library/ms179930.aspx)
-ldap_prefix <- "OUHSC\\"
-
-####
-# Nothing below this line should need to change, assuming:
-# 1. the vignette was followed exactly (https://ouhscbbmc.github.io/REDCapR/articles/SecurityDatabase.html),
-# 2. your campus has exactly two REDCap instances.
-
-# SQL sent to the MySQL database underneath each REDCap instance.
-sql <- "
-  SELECT username, project_id, api_token
-  FROM redcap_user_rights
-  WHERE api_token IS NOT NULL
-"
-
-# Update this ad-hoc CSV.  Each row should represent one REDCap instance.
-ds_url <- tibble::tribble(
-  ~instance         , ~redcap_uri,
-  name_production   , uri_production,
-  name_dev          , uri_dev
-)
-
-# Remove variables that aren't used below.
-rm(uri_production, uri_dev)
-
-
-# ---- load-data ---------------------------------------------------------------
-
-# Load the credentials from the first/production REDCap instance.
-cnn_production  <- DBI::dbConnect(odbc::odbc(), dsn=dsn_production)
-ds_production   <- DBI::dbGetQuery(cnn_production, sql)
-DBI::dbDisconnect(cnn_production); rm(cnn_production, dsn_production)
-
-# Load the credentials from the second/dev REDCap instance.
-cnn_dev         <- DBI::dbConnect(odbc::odbc(), dsn=dsn_dev)
-ds_dev          <- DBI::dbGetQuery(cnn_dev, sql)
-DBI::dbDisconnect(cnn_dev); rm(cnn_dev, dsn_dev)
-
-rm(sql)
-
-# Assert these are valid datasets and contain at least 5 rows.
-#   Adjust '5' to smaller value if necessary.  It's just to catch blatant retrieval problems.
-checkmate::assert_data_frame(ds_production, min.rows=5)
-checkmate::assert_data_frame(ds_dev       , min.rows=5)
-
-
-# ---- tweak-data --------------------------------------------------------------
-
-# Label each instance, so they're distinguishable later.
-ds_production$instance <- name_production
-ds_dev$instance        <- name_dev
-
-# Stack the token collection from each instance.  Then prefix the username and include the URL of each instance.
-ds <-
-  ds_production %>%
-  dplyr::union(ds_dev) %>%                                # Remove union if the dev instance isn't included.
-  tibble::as_tibble() %>%
-  dplyr::select(
-    username        = username,
-    project_id      = project_id,
-    instance        = instance,
-    token           = api_token
-  ) %>%
-  dplyr::mutate(
-    username        = paste0(ldap_prefix, username), # Qualify for the Active Directory.
-  ) %>%
-  dplyr::left_join( ds_url, by="instance") %>%            # Include the instance URL.
-  dplyr::arrange(instance, project_id, username) %>%
-  tibble::rowid_to_column("id")                           # For the sake of a clustered primary key.
-
-rm(ds_production, ds_dev, ds_url)
-rm(name_production, name_dev)
-rm(ldap_prefix)
-
-
-# ---- verify-values -----------------------------------------------------------
-
-# Assert that the dataset is well-behaved.
-# OuhscMunge::verify_value_headstart(ds)
-checkmate::assert_integer(  ds$id         , any.missing=FALSE, lower=1, upper=.Machine$integer.max, unique=TRUE)
-checkmate::assert_character(ds$username   , any.missing=FALSE, pattern="^.{1,255}$"                         )
-checkmate::assert_integer(  ds$project_id , any.missing=FALSE, lower=1, upper=.Machine$integer.max          )
-checkmate::assert_character(ds$token      , any.missing=FALSE, pattern="^[A-Z0-9]{32}$"           , unique=TRUE)
-checkmate::assert_character(ds$instance   , any.missing=FALSE, pattern="^.{1,255}$"                         )
-checkmate::assert_character(ds$redcap_uri , any.missing=FALSE, pattern="^.{1,255}$"                         )
-
-testit::assert(
-  "The `username` x `project_id` x `instance` must be unique.",
-  sum(duplicated(paste0(ds$username, "-", ds$project_id, "-", ds$instance))) == 0L
-)
-
-testit::assert("At least 10 tokens should be ready to write." , 10L <= nrow(ds))
-
-
-# ---- specify-columns-to-upload -----------------------------------------------
-
-# Dictate the exact columns and order that will be uploaded.
-columns_to_write <- c("id", "username", "project_id", "instance", "token", "redcap_uri")
-ds_slim          <- ds[, columns_to_write]
-rm(columns_to_write)
-
-
-# ---- upload-to-db ------------------------------------------------------------------
-
-OuhscMunge::upload_sqls_odbc(
-  d               = ds_slim,
-  schema_name     = "redcap_private",
-  table_name      = "tbl_credential",
-  dsn_name        = dsn_source,
-  create_table    = FALSE,
-  clear_table     = TRUE,
-  transaction     = TRUE,
-  verbose         = TRUE
-)
-# Uploading 252 tokens takes 0.004 minutes.

+
rm(list=ls(all=TRUE)) #Clear the memory for any variables set from any previous runs.
+
+# ---- load-sources ------------------------------------------------------------
+
+# ---- load-packages -----------------------------------------------------------
+if (!require(OuhscMunge))
+  stop('The `OuhscMunge` package needs to be installed with `remotes::install_github("OuhscBbmc/OuhscMunge")`.')
+
+testit::assert(
+  "The `OuhscMunge` package should meet a minimal version.",
+  compareVersion( as.character(packageVersion("OuhscMunge")), "0.1.9.9009") >= 0L
+)
+
+library(magrittr)
+requireNamespace("DBI")
+requireNamespace("odbc")
+requireNamespace("dplyr")
+requireNamespace("readr")
+requireNamespace("tibble")
+requireNamespace("testit")
+requireNamespace("checkmate")
+requireNamespace("OuhscMunge")  # remotes::install_github("OuhscBbmc/OuhscMunge")
+
+
+# ---- declare-globals ---------------------------------------------------------
+# This file assume your campus has two REDCap instances.
+# Modify each (a) database name, (b) REDCap URL, and (c) DSN name.
+
+name_production <- "production"
+name_dev        <- "dev"
+
+uri_production  <- "https://redcap-production.ouhsc.edu/redcap/api/",
+uri_dev         <- "https://redcap-dev.ouhsc.edu/redcap/api/"
+
+dsn_production  <- "redcap-production"
+dsn_dev         <- "redcap-dev"
+dsn_source      <- "auxiliary_security" # The DSN of the token server.
+
+# The Activity Directory name that should precede each username.
+#   This should correspond with the result of SQL Server's `SYSTEM_USER` function
+#   (https://msdn.microsoft.com/en-us/library/ms179930.aspx)
+ldap_prefix <- "OUHSC\\"
+
+####
+# Nothing below this line should need to change, assuming:
+# 1. the vignette was followed exactly (https://ouhscbbmc.github.io/REDCapR/articles/SecurityDatabase.html),
+# 2. your campus has exactly two REDCap instances.
+
+# SQL sent to the MySQL database underneath each REDCap instance.
+sql <- "
+  SELECT username, project_id, api_token
+  FROM redcap_user_rights
+  WHERE api_token IS NOT NULL
+"
+
+# Update this ad-hoc CSV.  Each row should represent one REDCap instance.
+ds_url <- tibble::tribble(
+  ~instance         , ~redcap_uri,
+  name_production   , uri_production,
+  name_dev          , uri_dev
+)
+
+# Remove variables that aren't used below.
+rm(uri_production, uri_dev)
+
+
+# ---- load-data ---------------------------------------------------------------
+
+# Load the credentials from the first/production REDCap instance.
+cnn_production  <- DBI::dbConnect(odbc::odbc(), dsn=dsn_production)
+ds_production   <- DBI::dbGetQuery(cnn_production, sql)
+DBI::dbDisconnect(cnn_production); rm(cnn_production, dsn_production)
+
+# Load the credentials from the second/dev REDCap instance.
+cnn_dev         <- DBI::dbConnect(odbc::odbc(), dsn=dsn_dev)
+ds_dev          <- DBI::dbGetQuery(cnn_dev, sql)
+DBI::dbDisconnect(cnn_dev); rm(cnn_dev, dsn_dev)
+
+rm(sql)
+
+# Assert these are valid datasets and contain at least 5 rows.
+#   Adjust '5' to smaller value if necessary.  It's just to catch blatant retrieval problems.
+checkmate::assert_data_frame(ds_production, min.rows=5)
+checkmate::assert_data_frame(ds_dev       , min.rows=5)
+
+
+# ---- tweak-data --------------------------------------------------------------
+
+# Label each instance, so they're distinguishable later.
+ds_production$instance <- name_production
+ds_dev$instance        <- name_dev
+
+# Stack the token collection from each instance.  Then prefix the username and include the URL of each instance.
+ds <-
+  ds_production %>%
+  dplyr::union(ds_dev) %>%                                # Remove union if the dev instance isn't included.
+  tibble::as_tibble() %>%
+  dplyr::select(
+    username        = username,
+    project_id      = project_id,
+    instance        = instance,
+    token           = api_token
+  ) %>%
+  dplyr::mutate(
+    username        = paste0(ldap_prefix, username), # Qualify for the Active Directory.
+  ) %>%
+  dplyr::left_join( ds_url, by="instance") %>%            # Include the instance URL.
+  dplyr::arrange(instance, project_id, username) %>%
+  tibble::rowid_to_column("id")                           # For the sake of a clustered primary key.
+
+rm(ds_production, ds_dev, ds_url)
+rm(name_production, name_dev)
+rm(ldap_prefix)
+
+
+# ---- verify-values -----------------------------------------------------------
+
+# Assert that the dataset is well-behaved.
+# OuhscMunge::verify_value_headstart(ds)
+checkmate::assert_integer(  ds$id         , any.missing=FALSE, lower=1, upper=.Machine$integer.max, unique=TRUE)
+checkmate::assert_character(ds$username   , any.missing=FALSE, pattern="^.{1,255}$"                         )
+checkmate::assert_integer(  ds$project_id , any.missing=FALSE, lower=1, upper=.Machine$integer.max          )
+checkmate::assert_character(ds$token      , any.missing=FALSE, pattern="^[A-Z0-9]{32}$"           , unique=TRUE)
+checkmate::assert_character(ds$instance   , any.missing=FALSE, pattern="^.{1,255}$"                         )
+checkmate::assert_character(ds$redcap_uri , any.missing=FALSE, pattern="^.{1,255}$"                         )
+
+testit::assert(
+  "The `username` x `project_id` x `instance` must be unique.",
+  sum(duplicated(paste0(ds$username, "-", ds$project_id, "-", ds$instance))) == 0L
+)
+
+testit::assert("At least 10 tokens should be ready to write." , 10L <= nrow(ds))
+
+
+# ---- specify-columns-to-upload -----------------------------------------------
+
+# Dictate the exact columns and order that will be uploaded.
+columns_to_write <- c("id", "username", "project_id", "instance", "token", "redcap_uri")
+ds_slim          <- ds[, columns_to_write]
+rm(columns_to_write)
+
+
+# ---- upload-to-db ------------------------------------------------------------------
+
+OuhscMunge::upload_sqls_odbc(
+  d               = ds_slim,
+  schema_name     = "redcap_private",
+  table_name      = "tbl_credential",
+  dsn_name        = dsn_source,
+  create_table    = FALSE,
+  clear_table     = TRUE,
+  transaction     = TRUE,
+  verbose         = TRUE
+)
+# Uploading 252 tokens takes 0.004 minutes.

Document Info @@ -479,7 +479,7 @@

Document Info

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/TroubleshootingApiCalls.html b/articles/TroubleshootingApiCalls.html index 8d73c7e2..4cf8fa88 100644 --- a/articles/TroubleshootingApiCalls.html +++ b/articles/TroubleshootingApiCalls.html @@ -12,7 +12,7 @@ - + @@ -86,7 +86,7 @@ diff --git a/articles/advanced-redcapr-operations.html b/articles/advanced-redcapr-operations.html index c643a591..79c33838 100644 --- a/articles/advanced-redcapr-operations.html +++ b/articles/advanced-redcapr-operations.html @@ -12,7 +12,7 @@ - + @@ -86,7 +86,7 @@

SSL Options @@ -358,7 +358,7 @@

SSL Options= config_options )$data }

-
#> 5 records and 25 columns were read from REDCap in 0.1 seconds.  The http status code was 200.
+
#> 5 records and 25 columns were read from REDCap in 0.2 seconds.  The http status code was 200.

Force the connection to use SSL=3 (which is not preferred, and possibly insecure).

-
#> 5 records and 25 columns were read from REDCap in 0.1 seconds.  The http status code was 200.
+
#> 5 records and 25 columns were read from REDCap in 0.2 seconds.  The http status code was 200.
 config_options <- list(ssl.verifypeer = FALSE)
 ds_no_ssl <- redcap_read_oneshot(
@@ -376,7 +376,7 @@ 

SSL Options= token_simple, config_options = config_options )$data

-
#> 5 records and 25 columns were read from REDCap in 0.1 seconds.  The http status code was 200.
+
#> 5 records and 25 columns were read from REDCap in 0.2 seconds.  The http status code was 200.

Convert SPSS Output to REDCap data dictionary @@ -405,88 +405,86 @@

Session Information
#> ─ Session info ───────────────────────────────────────────────────────────────
 #>  setting  value
-#>  version  R version 4.3.2 (2023-10-31)
-#>  os       macOS Monterey 12.7.2
-#>  system   x86_64, darwin20
+#>  version  R version 4.4.0 (2024-04-24)
+#>  os       macOS Sonoma 14.5
+#>  system   aarch64, darwin20
 #>  ui       X11
 #>  language en
 #>  collate  en_US.UTF-8
 #>  ctype    en_US.UTF-8
 #>  tz       UTC
-#>  date     2024-01-22
-#>  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
+#>  date     2024-06-11
+#>  pandoc   3.1.11 @ /usr/local/bin/ (via rmarkdown)
 #> 
 #> ─ Packages ───────────────────────────────────────────────────────────────────
 #>  package     * version  date (UTC) lib source
-#>  backports     1.4.1    2021-12-13 [1] CRAN (R 4.3.0)
-#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.3.0)
-#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.3.0)
-#>  bslib         0.6.1    2023-11-28 [1] CRAN (R 4.3.0)
-#>  cachem        1.0.8    2023-05-01 [1] CRAN (R 4.3.0)
-#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.3.0)
-#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.3.0)
-#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.3.0)
-#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.3.0)
-#>  curl          5.2.0    2023-12-08 [1] CRAN (R 4.3.0)
-#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.3.0)
-#>  digest        0.6.34   2024-01-11 [1] CRAN (R 4.3.0)
-#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.3.0)
-#>  evaluate      0.23     2023-11-01 [1] CRAN (R 4.3.0)
-#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.3.0)
-#>  fastmap       1.1.1    2023-02-24 [1] CRAN (R 4.3.0)
-#>  fs            1.6.3    2023-07-20 [1] CRAN (R 4.3.0)
-#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.3.0)
-#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.3.0)
-#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.3.0)
-#>  htmltools     0.5.7    2023-11-03 [1] CRAN (R 4.3.0)
-#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.3.0)
-#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.3.0)
-#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.3.0)
-#>  kableExtra    1.3.4    2021-02-20 [1] CRAN (R 4.3.0)
-#>  knitr       * 1.45     2023-10-30 [1] CRAN (R 4.3.0)
-#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.3.0)
-#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.3.0)
-#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.3.0)
-#>  munsell       0.5.0    2018-06-12 [1] CRAN (R 4.3.0)
-#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.3.0)
-#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.3.0)
-#>  pkgdown       2.0.7    2022-12-14 [1] CRAN (R 4.3.0)
-#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.3.0)
-#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.3.0)
-#>  ragg          1.2.7    2023-12-11 [1] CRAN (R 4.3.0)
-#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.3.0)
-#>  REDCapR     * 1.1.9005 2024-01-22 [1] local
-#>  rlang         1.1.3    2024-01-10 [1] CRAN (R 4.3.0)
-#>  rmarkdown     2.25     2023-09-18 [1] CRAN (R 4.3.0)
-#>  rstudioapi    0.15.0   2023-07-07 [1] CRAN (R 4.3.0)
-#>  rvest         1.0.3    2022-08-19 [1] CRAN (R 4.3.0)
-#>  sass          0.4.8    2023-12-06 [1] CRAN (R 4.3.0)
-#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.3.0)
-#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.3.0)
-#>  stringi       1.8.3    2023-12-11 [1] CRAN (R 4.3.0)
-#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.3.0)
-#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.3.0)
-#>  systemfonts   1.0.5    2023-10-09 [1] CRAN (R 4.3.0)
-#>  textshaping   0.3.7    2023-10-09 [1] CRAN (R 4.3.0)
-#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.3.0)
-#>  tidyr         1.3.0    2023-01-24 [1] CRAN (R 4.3.0)
-#>  tidyselect    1.2.0    2022-10-10 [1] CRAN (R 4.3.0)
-#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.3.0)
-#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.3.0)
-#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.3.0)
-#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.3.0)
-#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.3.0)
-#>  webshot       0.5.5    2023-06-26 [1] CRAN (R 4.3.0)
-#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.3.0)
-#>  xfun          0.41     2023-11-01 [1] CRAN (R 4.3.0)
-#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.3.0)
-#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.3.0)
+#>  backports     1.5.0    2024-05-23 [1] CRAN (R 4.4.0)
+#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.4.0)
+#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.4.0)
+#>  bslib         0.7.0    2024-03-29 [1] CRAN (R 4.4.0)
+#>  cachem        1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
+#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.4.0)
+#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.4.0)
+#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.4.0)
+#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.4.0)
+#>  curl          5.2.1    2024-03-01 [1] CRAN (R 4.4.0)
+#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.4.0)
+#>  digest        0.6.35   2024-03-11 [1] CRAN (R 4.4.0)
+#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
+#>  evaluate      0.24.0   2024-06-10 [1] CRAN (R 4.4.0)
+#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
+#>  fastmap       1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  fs            1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
+#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
+#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
+#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
+#>  htmltools     0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
+#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.4.0)
+#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.4.0)
+#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
+#>  kableExtra    1.4.0    2024-01-24 [1] CRAN (R 4.4.0)
+#>  knitr       * 1.47     2024-05-29 [1] CRAN (R 4.4.0)
+#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
+#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
+#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
+#>  munsell       0.5.1    2024-04-01 [1] CRAN (R 4.4.0)
+#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
+#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
+#>  pkgdown       2.0.9    2024-04-18 [1] CRAN (R 4.4.0)
+#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
+#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
+#>  ragg          1.3.2    2024-05-15 [1] CRAN (R 4.4.0)
+#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
+#>  REDCapR     * 1.1.9005 2024-06-11 [1] local
+#>  rlang         1.1.4    2024-06-04 [1] CRAN (R 4.4.0)
+#>  rmarkdown     2.27     2024-05-17 [1] CRAN (R 4.4.0)
+#>  rstudioapi    0.16.0   2024-03-24 [1] CRAN (R 4.4.0)
+#>  sass          0.4.9    2024-03-15 [1] CRAN (R 4.4.0)
+#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.4.0)
+#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
+#>  stringi       1.8.4    2024-05-06 [1] CRAN (R 4.4.0)
+#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.4.0)
+#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.4.0)
+#>  systemfonts   1.1.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  textshaping   0.4.0    2024-05-24 [1] CRAN (R 4.4.0)
+#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
+#>  tidyr         1.3.1    2024-01-24 [1] CRAN (R 4.4.0)
+#>  tidyselect    1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
+#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
+#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
+#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
+#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.4.0)
+#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.4.0)
+#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
+#>  xfun          0.44     2024-05-15 [1] CRAN (R 4.4.0)
+#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.4.0)
+#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.4.0)
 #> 
 #>  [1] /Users/runner/work/_temp/Library
-#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
+#>  [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
 #> 
 #> ──────────────────────────────────────────────────────────────────────────────
-

Report rendered by runner at 2024-01-22, 17:11 +0000 in 3 +

Report rendered by runner at 2024-06-11, 17:21 +0000 in 2 seconds.

@@ -508,7 +506,7 @@

Session Information

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/index.html b/articles/index.html index eb03a2f1..05fc99cb 100644 --- a/articles/index.html +++ b/articles/index.html @@ -1,5 +1,5 @@ -Articles • REDCapRArticles • REDCapR @@ -82,7 +82,7 @@

Getting Started

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/longitudinal-and-repeating.html b/articles/longitudinal-and-repeating.html index 02f05966..60ccba03 100644 --- a/articles/longitudinal-and-repeating.html +++ b/articles/longitudinal-and-repeating.html @@ -12,7 +12,7 @@ - + @@ -174,27 +174,27 @@

Table 1: patient grainThis patient-grain structure is how the data points are most comfortably inputted by humans into REDCap, and it is the default when exported through the browser and API. However it is stored differently -under the hood.

+by REDCap’s internal database.

REDCap’s flexibility is a driver of its success. Once a research team -learns REDCap, it can reuse the knowledge to capture anything from qqq -to qqq. But to achieve this flexibility in the world of REDCap and EMRs, -data are stored along the observation grain. In computer science, this -is commonly called an EAV structure (which stands for -entity-attribute-value). The patient’s ID is the entity, the variable -type is the attribute, and the observed point is the value. It can also -be thought of as a “key-value store” nested within a patient (where -“key” is a synonym of “attribute”). Notice that the two wider rows have -morphed into six skinnier rows –one row per observation. If you are a -curious database administrator, peek at the the structure and rows of -the redcap_data table. It is the most important table in -the database.

+learns REDCap, it can reuse the knowledge to capture anything from +leukemia to lunch orders. But to achieve this flexibility in the world +of REDCap and EMRs, data are stored along the observation grain. In +computer science, this is commonly called an EAV structure (which stands +for entity-attribute-value). The patient’s ID is the entity, the +variable type is the attribute, and the observed point is the value. It +can also be thought of as a “key-value store” nested within a patient +(where “key” is a synonym of “attribute”). Notice that the two wider +rows have morphed into six skinnier rows –one row per observation. If +you are a curious database administrator, peek at the the structure and +rows of the redcap_data table. It is the most important +table in the database.

Table 2: observation grain for intake instrument

-

REDCap and EMR databases have an “observation” t, store observations -in their underlying table. This table is a simplification of the -redcap_data table, which is the heart of the database.

+

REDCap and EMR databases store observations in their underlying +table. This table is a simplification of the redcap_data +table, which is the heart of the REDCap’s internal database.

@@ -235,11 +235,11 @@

Table 2: observation gr

pt
id

If the investigation gains a longitudinal or repeating component, it -becomes necessary to include the dimension of time. Suppose the -protocols specifies five time points; the blood pressure instrument is -captured at times 1, 2, & 3 while the laboratory instrument is -captured at times 1 & 2. If you record this stage on paper, it will -likely resemble Tables 3a & 3b: one for vitals and one for labs.

+becomes necessary to include the dimension of time. Suppose the protocol +specifies five time points; the blood pressure instrument is captured at +times 1, 2, & 3 while the laboratory instrument is captured at times +1 & 2. If you record this stage on paper, it will likely resemble +Tables 3a & 3b: one for vitals and one for labs.

Table 3a: patient-time grain for blood_pressure @@ -755,7 +755,9 @@

Table 5: mishmashed grain +needed to be able to recover the original matrix unambiguously. (source: +Wikipedia: +Sparse matrix - storage)

@@ -862,7 +864,7 @@

Retrieve patient- REDCapR::redcap_read( redcap_uri = credential$redcap_uri, # From the previous code snippet. token = credential$token, - forms = "intake", + forms = c("intake"), col_types = col_types_intake, verbose = FALSE, )$data @@ -934,7 +936,7 @@

Retrie REDCapR::redcap_read( redcap_uri = credential$redcap_uri, token = credential$token, - forms = "blood_pressure", + forms = c("blood_pressure"), col_types = col_types_blood_pressure, verbose = FALSE )$data @@ -1101,7 +1103,7 @@

Retrie REDCapR::redcap_read( redcap_uri = credential$redcap_uri, token = credential$token, - forms = "laboratory", + forms = c("laboratory"), col_types = col_types_laboratory, verbose = FALSE )$data @@ -1866,12 +1868,14 @@

Escalating to REDCapR

Note that the efficiency gain from moving from the block dataset to -REDCapTidieR is different than the gain from moving from REDCapTidieR. -When moving to from Table 5 to qqq (via REDCapTidieR), you are -eliminating empty cells that will never contain worthwhile data. When -moving to REDCapR, you are eliminating cells that contain data, but may -not be relevant to your analysis (such as a patient’s name or the time a -lab specimen was collected). {This paragraph needs work.}

+REDCapTidieR is different than the gain from moving from REDCapTidieR to +REDCapR. When moving to from Table 5 to a
REDCapTidieR +Supertibble, you are eliminating empty cells that will never contain +worthwhile data. When moving from a REDCapTidieR Supertibble call to a +collection of REDCapR calls, you are eliminating cells that contain +data, but may not be relevant to your analysis (such as a patient’s name +or the time a lab specimen was collected). {This paragraph needs +work.}

@@ -2124,85 +2128,83 @@

Session Information
#> ─ Session info ───────────────────────────────────────────────────────────────
 #>  setting  value
-#>  version  R version 4.3.2 (2023-10-31)
-#>  os       macOS Monterey 12.7.2
-#>  system   x86_64, darwin20
+#>  version  R version 4.4.0 (2024-04-24)
+#>  os       macOS Sonoma 14.5
+#>  system   aarch64, darwin20
 #>  ui       X11
 #>  language en
 #>  collate  en_US.UTF-8
 #>  ctype    en_US.UTF-8
 #>  tz       UTC
-#>  date     2024-01-22
-#>  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
+#>  date     2024-06-11
+#>  pandoc   3.1.11 @ /usr/local/bin/ (via rmarkdown)
 #> 
 #> ─ Packages ───────────────────────────────────────────────────────────────────
 #>  package     * version  date (UTC) lib source
-#>  backports     1.4.1    2021-12-13 [1] CRAN (R 4.3.0)
-#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.3.0)
-#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.3.0)
-#>  bslib         0.6.1    2023-11-28 [1] CRAN (R 4.3.0)
-#>  cachem        1.0.8    2023-05-01 [1] CRAN (R 4.3.0)
-#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.3.0)
-#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.3.0)
-#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.3.0)
-#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.3.0)
-#>  curl          5.2.0    2023-12-08 [1] CRAN (R 4.3.0)
-#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.3.0)
-#>  digest        0.6.34   2024-01-11 [1] CRAN (R 4.3.0)
-#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.3.0)
-#>  evaluate      0.23     2023-11-01 [1] CRAN (R 4.3.0)
-#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.3.0)
-#>  fastmap       1.1.1    2023-02-24 [1] CRAN (R 4.3.0)
-#>  fs            1.6.3    2023-07-20 [1] CRAN (R 4.3.0)
-#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.3.0)
-#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.3.0)
-#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.3.0)
-#>  htmltools     0.5.7    2023-11-03 [1] CRAN (R 4.3.0)
-#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.3.0)
-#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.3.0)
-#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.3.0)
-#>  kableExtra    1.3.4    2021-02-20 [1] CRAN (R 4.3.0)
-#>  knitr       * 1.45     2023-10-30 [1] CRAN (R 4.3.0)
-#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.3.0)
-#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.3.0)
-#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.3.0)
-#>  munsell       0.5.0    2018-06-12 [1] CRAN (R 4.3.0)
-#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.3.0)
-#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.3.0)
-#>  pkgdown       2.0.7    2022-12-14 [1] CRAN (R 4.3.0)
-#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.3.0)
-#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.3.0)
-#>  ragg          1.2.7    2023-12-11 [1] CRAN (R 4.3.0)
-#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.3.0)
-#>  REDCapR       1.1.9005 2024-01-22 [1] local
-#>  rlang         1.1.3    2024-01-10 [1] CRAN (R 4.3.0)
-#>  rmarkdown     2.25     2023-09-18 [1] CRAN (R 4.3.0)
-#>  rstudioapi    0.15.0   2023-07-07 [1] CRAN (R 4.3.0)
-#>  rvest         1.0.3    2022-08-19 [1] CRAN (R 4.3.0)
-#>  sass          0.4.8    2023-12-06 [1] CRAN (R 4.3.0)
-#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.3.0)
-#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.3.0)
-#>  stringi       1.8.3    2023-12-11 [1] CRAN (R 4.3.0)
-#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.3.0)
-#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.3.0)
-#>  systemfonts   1.0.5    2023-10-09 [1] CRAN (R 4.3.0)
-#>  textshaping   0.3.7    2023-10-09 [1] CRAN (R 4.3.0)
-#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.3.0)
-#>  tidyr         1.3.0    2023-01-24 [1] CRAN (R 4.3.0)
-#>  tidyselect    1.2.0    2022-10-10 [1] CRAN (R 4.3.0)
-#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.3.0)
-#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.3.0)
-#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.3.0)
-#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.3.0)
-#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.3.0)
-#>  webshot       0.5.5    2023-06-26 [1] CRAN (R 4.3.0)
-#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.3.0)
-#>  xfun          0.41     2023-11-01 [1] CRAN (R 4.3.0)
-#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.3.0)
-#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.3.0)
+#>  backports     1.5.0    2024-05-23 [1] CRAN (R 4.4.0)
+#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.4.0)
+#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.4.0)
+#>  bslib         0.7.0    2024-03-29 [1] CRAN (R 4.4.0)
+#>  cachem        1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
+#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.4.0)
+#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.4.0)
+#>  colorspace    2.1-0    2023-01-23 [1] CRAN (R 4.4.0)
+#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.4.0)
+#>  curl          5.2.1    2024-03-01 [1] CRAN (R 4.4.0)
+#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.4.0)
+#>  digest        0.6.35   2024-03-11 [1] CRAN (R 4.4.0)
+#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
+#>  evaluate      0.24.0   2024-06-10 [1] CRAN (R 4.4.0)
+#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
+#>  fastmap       1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  fs            1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
+#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
+#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
+#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
+#>  htmltools     0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
+#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.4.0)
+#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.4.0)
+#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
+#>  kableExtra    1.4.0    2024-01-24 [1] CRAN (R 4.4.0)
+#>  knitr       * 1.47     2024-05-29 [1] CRAN (R 4.4.0)
+#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
+#>  magrittr    * 2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
+#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
+#>  munsell       0.5.1    2024-04-01 [1] CRAN (R 4.4.0)
+#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
+#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
+#>  pkgdown       2.0.9    2024-04-18 [1] CRAN (R 4.4.0)
+#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
+#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
+#>  ragg          1.3.2    2024-05-15 [1] CRAN (R 4.4.0)
+#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
+#>  REDCapR       1.1.9005 2024-06-11 [1] local
+#>  rlang         1.1.4    2024-06-04 [1] CRAN (R 4.4.0)
+#>  rmarkdown     2.27     2024-05-17 [1] CRAN (R 4.4.0)
+#>  rstudioapi    0.16.0   2024-03-24 [1] CRAN (R 4.4.0)
+#>  sass          0.4.9    2024-03-15 [1] CRAN (R 4.4.0)
+#>  scales        1.3.0    2023-11-28 [1] CRAN (R 4.4.0)
+#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
+#>  stringi       1.8.4    2024-05-06 [1] CRAN (R 4.4.0)
+#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.4.0)
+#>  svglite       2.1.3    2023-12-08 [1] CRAN (R 4.4.0)
+#>  systemfonts   1.1.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  textshaping   0.4.0    2024-05-24 [1] CRAN (R 4.4.0)
+#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
+#>  tidyr         1.3.1    2024-01-24 [1] CRAN (R 4.4.0)
+#>  tidyselect    1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
+#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
+#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
+#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
+#>  viridisLite   0.4.2    2023-05-02 [1] CRAN (R 4.4.0)
+#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.4.0)
+#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
+#>  xfun          0.44     2024-05-15 [1] CRAN (R 4.4.0)
+#>  xml2          1.3.6    2023-12-04 [1] CRAN (R 4.4.0)
+#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.4.0)
 #> 
 #>  [1] /Users/runner/work/_temp/Library
-#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
+#>  [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
 #> 
 #> ──────────────────────────────────────────────────────────────────────────────
@@ -2226,7 +2228,7 @@

Session Information

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/workflow-read.html b/articles/workflow-read.html index 5b6776fc..f367f07a 100644 --- a/articles/workflow-read.html +++ b/articles/workflow-read.html @@ -12,7 +12,7 @@ - + @@ -132,11 +132,12 @@

Verify REDCapR is installed webpage.

+If this call fails, follow the installation instructions on the REDCapR website.

 requireNamespace("REDCapR")
-#> Loading required namespace: REDCapR
-
+#> Loading required namespace: REDCapR
+
+
 # If this fails, run `install.packages("REDCapR")` or `remotes::install_github(repo="OuhscBbmc/REDCapR")`

If you’re a workshop attendee, you can use this vignette to copy snippets of code to your local machine to follow along with the @@ -199,7 +200,7 @@

Part 2 - Retrieve Protected Token). For a project with PHI, never hard-code the password directly in an R file. In other words, no PHI project should be accessed with an R file that includes the line

-
+
 my_secret_token <- "9A81268476645C4E5F03428B8AC3AA7B"

Instead, we suggest storing the token in a location that can be accessed by only you. We have two recommendations.

@@ -220,7 +221,7 @@

Security Method 1: Token File

To retrieve the credentials for the first project listed above, pass the value of “153” to project_id.

-
+
 path_credential <- system.file("misc/example.credentials", package = "REDCapR")
 credential  <- REDCapR::retrieve_credential_local(
   path_credential = path_credential,
@@ -265,7 +266,7 @@ 

Part 3 - Read Data: Unstructur

The redcap_uri and token fields are the only required arguments of REDCapR::redcap_read(); both are in the credential object created in the previous section.

-
+
 ds_1 <-
   REDCapR::redcap_read(
     redcap_uri  = credential$redcap_uri,
@@ -275,14 +276,14 @@ 

Part 3 - Read Data: Unstructur #> The data dictionary describing 17 fields was read from REDCap in 0.1 seconds. The http status code was 200. #> 3 instrument metadata records were read from REDCap in 0.1 seconds. The http status code was 200. #> 1 rows were read from REDCap in 0.1 seconds. The http status code was 200. -#> 2 data access groups were read from REDCap in 0.2 seconds. The http status code was 200. -#> 5 records and 1 columns were read from REDCap in 0.1 seconds. The http status code was 200. -#> Starting to read 5 records at 2024-01-22 17:12:06.381678. +#> 2 data access groups were read from REDCap in 0.1 seconds. The http status code was 200. +#> 5 records and 1 columns were read from REDCap in 0.2 seconds. The http status code was 200. +#> Starting to read 5 records at 2024-06-11 17:21:44.527724. #> Reading batch 1 of 1, with subjects 1 through 5 (ie, 5 unique subject records). -#> 5 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200.

+#> 5 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200.

At this point, the data.frame ds_1 has everything you need to start analyzing the project.

-
+
 ds_1
 #> # A tibble: 5 × 25
 #>   record_id name_first name_last address  telephone email dob          age   sex
@@ -296,11 +297,12 @@ 

Part 3 - Read Data: Unstructur #> # bmi <dbl>, comments <chr>, mugshot <chr>, health_complete <dbl>, #> # race___1 <dbl>, race___2 <dbl>, race___3 <dbl>, race___4 <dbl>, #> # race___5 <dbl>, race___6 <dbl>, ethnicity <dbl>, interpreter_needed <dbl>, -#> # race_and_ethnicity_complete <dbl> - +#> # race_and_ethnicity_complete <dbl>

+
+
 hist(ds_1$weight)

-
+
 
 summary(ds_1)
 #>    record_id  name_first         name_last           address         
@@ -350,8 +352,9 @@ 

Part 3 - Read Data: Unstructur #> Mean :0.2 Mean :1 Mean :0.25 Mean :1.6 #> 3rd Qu.:0.0 3rd Qu.:1 3rd Qu.:0.25 3rd Qu.:2.0 #> Max. :1.0 Max. :2 Max. :1.00 Max. :2.0 -#> NA's :1 - +#> NA's :1

+
+
 summary(lm(age ~ 1 + sex + bmi, data = ds_1))
 #> 
 #> Call:
@@ -403,7 +406,7 @@ 

Specify Record IDs
+
 # Return only records with IDs of 1 and 4
 desired_records <- c(1, 4)
 REDCapR::redcap_read(
@@ -431,7 +434,7 @@ 

Specify Row Filter
+
 # Return only records with a birth date after January 2003
 REDCapR::redcap_read(
   redcap_uri    = credential$redcap_uri,
@@ -455,7 +458,7 @@ 

Specify Column Names
+
 # Return only the fields record_id, name_first, and age
 desired_fields <- c("record_id", "name_first", "age")
 REDCapR::redcap_read(
@@ -497,7 +500,7 @@ 

Part 5 - Read Data: Structured A

Specify Column Names & Types

-
+
 # Specify the column types.
 desired_fields <- c("record_id", "race")
 col_types <- readr::cols(
@@ -531,7 +534,7 @@ 

Specify Everything is a CharacterREDCap internally stores every value as a string. To accept full responsibility of the data types, tell readr::cols() to keep them as strings.

-
+
 # Specify the column types.
 desired_fields <- c("record_id", "race")
 col_types <- readr::cols(.default = readr::col_character())
@@ -624,75 +627,73 @@ 

Session Information
#> ─ Session info ───────────────────────────────────────────────────────────────
 #>  setting  value
-#>  version  R version 4.3.2 (2023-10-31)
-#>  os       macOS Monterey 12.7.2
-#>  system   x86_64, darwin20
+#>  version  R version 4.4.0 (2024-04-24)
+#>  os       macOS Sonoma 14.5
+#>  system   aarch64, darwin20
 #>  ui       X11
 #>  language en
 #>  collate  en_US.UTF-8
 #>  ctype    en_US.UTF-8
 #>  tz       UTC
-#>  date     2024-01-22
-#>  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
+#>  date     2024-06-11
+#>  pandoc   3.1.11 @ /usr/local/bin/ (via rmarkdown)
 #> 
 #> ─ Packages ───────────────────────────────────────────────────────────────────
 #>  package     * version  date (UTC) lib source
-#>  backports     1.4.1    2021-12-13 [1] CRAN (R 4.3.0)
-#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.3.0)
-#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.3.0)
-#>  bslib         0.6.1    2023-11-28 [1] CRAN (R 4.3.0)
-#>  cachem        1.0.8    2023-05-01 [1] CRAN (R 4.3.0)
-#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.3.0)
-#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.3.0)
-#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.3.0)
-#>  curl          5.2.0    2023-12-08 [1] CRAN (R 4.3.0)
-#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.3.0)
-#>  digest        0.6.34   2024-01-11 [1] CRAN (R 4.3.0)
-#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.3.0)
-#>  evaluate      0.23     2023-11-01 [1] CRAN (R 4.3.0)
-#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.3.0)
-#>  fastmap       1.1.1    2023-02-24 [1] CRAN (R 4.3.0)
-#>  fs            1.6.3    2023-07-20 [1] CRAN (R 4.3.0)
-#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.3.0)
-#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.3.0)
-#>  highr         0.10     2022-12-22 [1] CRAN (R 4.3.0)
-#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.3.0)
-#>  htmltools     0.5.7    2023-11-03 [1] CRAN (R 4.3.0)
-#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.3.0)
-#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.3.0)
-#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.3.0)
-#>  knitr         1.45     2023-10-30 [1] CRAN (R 4.3.0)
-#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.3.0)
-#>  magrittr      2.0.3    2022-03-30 [1] CRAN (R 4.3.0)
-#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.3.0)
-#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.3.0)
-#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.3.0)
-#>  pkgdown       2.0.7    2022-12-14 [1] CRAN (R 4.3.0)
-#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.3.0)
-#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.3.0)
-#>  ragg          1.2.7    2023-12-11 [1] CRAN (R 4.3.0)
-#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.3.0)
-#>  REDCapR       1.1.9005 2024-01-22 [1] local
-#>  rlang         1.1.3    2024-01-10 [1] CRAN (R 4.3.0)
-#>  rmarkdown     2.25     2023-09-18 [1] CRAN (R 4.3.0)
-#>  sass          0.4.8    2023-12-06 [1] CRAN (R 4.3.0)
-#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.3.0)
-#>  stringi       1.8.3    2023-12-11 [1] CRAN (R 4.3.0)
-#>  stringr       1.5.1    2023-11-14 [1] CRAN (R 4.3.0)
-#>  systemfonts   1.0.5    2023-10-09 [1] CRAN (R 4.3.0)
-#>  textshaping   0.3.7    2023-10-09 [1] CRAN (R 4.3.0)
-#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.3.0)
-#>  tidyselect    1.2.0    2022-10-10 [1] CRAN (R 4.3.0)
-#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.3.0)
-#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.3.0)
-#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.3.0)
-#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.3.0)
-#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.3.0)
-#>  xfun          0.41     2023-11-01 [1] CRAN (R 4.3.0)
-#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.3.0)
+#>  backports     1.5.0    2024-05-23 [1] CRAN (R 4.4.0)
+#>  bit           4.0.5    2022-11-15 [1] CRAN (R 4.4.0)
+#>  bit64         4.0.5    2020-08-30 [1] CRAN (R 4.4.0)
+#>  bslib         0.7.0    2024-03-29 [1] CRAN (R 4.4.0)
+#>  cachem        1.1.0    2024-05-16 [1] CRAN (R 4.4.0)
+#>  checkmate     2.3.1    2023-12-04 [1] CRAN (R 4.4.0)
+#>  cli           3.6.2    2023-12-11 [1] CRAN (R 4.4.0)
+#>  crayon        1.5.2    2022-09-29 [1] CRAN (R 4.4.0)
+#>  curl          5.2.1    2024-03-01 [1] CRAN (R 4.4.0)
+#>  desc          1.4.3    2023-12-10 [1] CRAN (R 4.4.0)
+#>  digest        0.6.35   2024-03-11 [1] CRAN (R 4.4.0)
+#>  dplyr         1.1.4    2023-11-17 [1] CRAN (R 4.4.0)
+#>  evaluate      0.24.0   2024-06-10 [1] CRAN (R 4.4.0)
+#>  fansi         1.0.6    2023-12-08 [1] CRAN (R 4.4.0)
+#>  fastmap       1.2.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  fs            1.6.4    2024-04-25 [1] CRAN (R 4.4.0)
+#>  generics      0.1.3    2022-07-05 [1] CRAN (R 4.4.0)
+#>  glue          1.7.0    2024-01-09 [1] CRAN (R 4.4.0)
+#>  highr         0.11     2024-05-26 [1] CRAN (R 4.4.0)
+#>  hms           1.1.3    2023-03-21 [1] CRAN (R 4.4.0)
+#>  htmltools     0.5.8.1  2024-04-04 [1] CRAN (R 4.4.0)
+#>  httr          1.4.7    2023-08-15 [1] CRAN (R 4.4.0)
+#>  jquerylib     0.1.4    2021-04-26 [1] CRAN (R 4.4.0)
+#>  jsonlite      1.8.8    2023-12-04 [1] CRAN (R 4.4.0)
+#>  knitr         1.47     2024-05-29 [1] CRAN (R 4.4.0)
+#>  lifecycle     1.0.4    2023-11-07 [1] CRAN (R 4.4.0)
+#>  magrittr      2.0.3    2022-03-30 [1] CRAN (R 4.4.0)
+#>  memoise       2.0.1    2021-11-26 [1] CRAN (R 4.4.0)
+#>  pillar        1.9.0    2023-03-22 [1] CRAN (R 4.4.0)
+#>  pkgconfig     2.0.3    2019-09-22 [1] CRAN (R 4.4.0)
+#>  pkgdown       2.0.9    2024-04-18 [1] CRAN (R 4.4.0)
+#>  purrr         1.0.2    2023-08-10 [1] CRAN (R 4.4.0)
+#>  R6            2.5.1    2021-08-19 [1] CRAN (R 4.4.0)
+#>  ragg          1.3.2    2024-05-15 [1] CRAN (R 4.4.0)
+#>  readr         2.1.5    2024-01-10 [1] CRAN (R 4.4.0)
+#>  REDCapR       1.1.9005 2024-06-11 [1] local
+#>  rlang         1.1.4    2024-06-04 [1] CRAN (R 4.4.0)
+#>  rmarkdown     2.27     2024-05-17 [1] CRAN (R 4.4.0)
+#>  sass          0.4.9    2024-03-15 [1] CRAN (R 4.4.0)
+#>  sessioninfo   1.2.2    2021-12-06 [1] CRAN (R 4.4.0)
+#>  systemfonts   1.1.0    2024-05-15 [1] CRAN (R 4.4.0)
+#>  textshaping   0.4.0    2024-05-24 [1] CRAN (R 4.4.0)
+#>  tibble        3.2.1    2023-03-20 [1] CRAN (R 4.4.0)
+#>  tidyselect    1.2.1    2024-03-11 [1] CRAN (R 4.4.0)
+#>  tzdb          0.4.0    2023-05-12 [1] CRAN (R 4.4.0)
+#>  utf8          1.2.4    2023-10-22 [1] CRAN (R 4.4.0)
+#>  vctrs         0.6.5    2023-12-01 [1] CRAN (R 4.4.0)
+#>  vroom         1.6.5    2023-12-05 [1] CRAN (R 4.4.0)
+#>  withr         3.0.0    2024-01-16 [1] CRAN (R 4.4.0)
+#>  xfun          0.44     2024-05-15 [1] CRAN (R 4.4.0)
+#>  yaml          2.3.8    2023-12-11 [1] CRAN (R 4.4.0)
 #> 
 #>  [1] /Users/runner/work/_temp/Library
-#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
+#>  [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
 #> 
 #> ──────────────────────────────────────────────────────────────────────────────
@@ -716,7 +717,7 @@

Session Information

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/articles/workflow-write.html b/articles/workflow-write.html index dd7b4235..f3c80c30 100644 --- a/articles/workflow-write.html +++ b/articles/workflow-write.html @@ -12,7 +12,7 @@ - + @@ -446,54 +446,51 @@

Session Information
#> ─ Session info ───────────────────────────────────────────────────────────────
 #>  setting  value
-#>  version  R version 4.3.2 (2023-10-31)
-#>  os       macOS Monterey 12.7.2
-#>  system   x86_64, darwin20
+#>  version  R version 4.4.0 (2024-04-24)
+#>  os       macOS Sonoma 14.5
+#>  system   aarch64, darwin20
 #>  ui       X11
 #>  language en
 #>  collate  en_US.UTF-8
 #>  ctype    en_US.UTF-8
 #>  tz       UTC
-#>  date     2024-01-22
-#>  pandoc   2.19.2 @ /usr/local/bin/ (via rmarkdown)
+#>  date     2024-06-11
+#>  pandoc   3.1.11 @ /usr/local/bin/ (via rmarkdown)
 #> 
 #> ─ Packages ───────────────────────────────────────────────────────────────────
 #>  package     * version date (UTC) lib source
-#>  bslib         0.6.1   2023-11-28 [1] CRAN (R 4.3.0)
-#>  cachem        1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
-#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.3.0)
-#>  desc          1.4.3   2023-12-10 [1] CRAN (R 4.3.0)
-#>  digest        0.6.34  2024-01-11 [1] CRAN (R 4.3.0)
-#>  evaluate      0.23    2023-11-01 [1] CRAN (R 4.3.0)
-#>  fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
-#>  fs            1.6.3   2023-07-20 [1] CRAN (R 4.3.0)
-#>  glue          1.7.0   2024-01-09 [1] CRAN (R 4.3.0)
-#>  highr         0.10    2022-12-22 [1] CRAN (R 4.3.0)
-#>  htmltools     0.5.7   2023-11-03 [1] CRAN (R 4.3.0)
-#>  jquerylib     0.1.4   2021-04-26 [1] CRAN (R 4.3.0)
-#>  jsonlite      1.8.8   2023-12-04 [1] CRAN (R 4.3.0)
-#>  knitr         1.45    2023-10-30 [1] CRAN (R 4.3.0)
-#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.3.0)
-#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
-#>  memoise       2.0.1   2021-11-26 [1] CRAN (R 4.3.0)
-#>  pkgdown       2.0.7   2022-12-14 [1] CRAN (R 4.3.0)
-#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.3.0)
-#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.3.0)
-#>  ragg          1.2.7   2023-12-11 [1] CRAN (R 4.3.0)
-#>  rlang         1.1.3   2024-01-10 [1] CRAN (R 4.3.0)
-#>  rmarkdown     2.25    2023-09-18 [1] CRAN (R 4.3.0)
-#>  sass          0.4.8   2023-12-06 [1] CRAN (R 4.3.0)
-#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
-#>  stringi       1.8.3   2023-12-11 [1] CRAN (R 4.3.0)
-#>  stringr       1.5.1   2023-11-14 [1] CRAN (R 4.3.0)
-#>  systemfonts   1.0.5   2023-10-09 [1] CRAN (R 4.3.0)
-#>  textshaping   0.3.7   2023-10-09 [1] CRAN (R 4.3.0)
-#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.3.0)
-#>  xfun          0.41    2023-11-01 [1] CRAN (R 4.3.0)
-#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.3.0)
+#>  bslib         0.7.0   2024-03-29 [1] CRAN (R 4.4.0)
+#>  cachem        1.1.0   2024-05-16 [1] CRAN (R 4.4.0)
+#>  cli           3.6.2   2023-12-11 [1] CRAN (R 4.4.0)
+#>  desc          1.4.3   2023-12-10 [1] CRAN (R 4.4.0)
+#>  digest        0.6.35  2024-03-11 [1] CRAN (R 4.4.0)
+#>  evaluate      0.24.0  2024-06-10 [1] CRAN (R 4.4.0)
+#>  fastmap       1.2.0   2024-05-15 [1] CRAN (R 4.4.0)
+#>  fs            1.6.4   2024-04-25 [1] CRAN (R 4.4.0)
+#>  highr         0.11    2024-05-26 [1] CRAN (R 4.4.0)
+#>  htmltools     0.5.8.1 2024-04-04 [1] CRAN (R 4.4.0)
+#>  jquerylib     0.1.4   2021-04-26 [1] CRAN (R 4.4.0)
+#>  jsonlite      1.8.8   2023-12-04 [1] CRAN (R 4.4.0)
+#>  knitr         1.47    2024-05-29 [1] CRAN (R 4.4.0)
+#>  lifecycle     1.0.4   2023-11-07 [1] CRAN (R 4.4.0)
+#>  magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.4.0)
+#>  memoise       2.0.1   2021-11-26 [1] CRAN (R 4.4.0)
+#>  pkgdown       2.0.9   2024-04-18 [1] CRAN (R 4.4.0)
+#>  purrr         1.0.2   2023-08-10 [1] CRAN (R 4.4.0)
+#>  R6            2.5.1   2021-08-19 [1] CRAN (R 4.4.0)
+#>  ragg          1.3.2   2024-05-15 [1] CRAN (R 4.4.0)
+#>  rlang         1.1.4   2024-06-04 [1] CRAN (R 4.4.0)
+#>  rmarkdown     2.27    2024-05-17 [1] CRAN (R 4.4.0)
+#>  sass          0.4.9   2024-03-15 [1] CRAN (R 4.4.0)
+#>  sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.4.0)
+#>  systemfonts   1.1.0   2024-05-15 [1] CRAN (R 4.4.0)
+#>  textshaping   0.4.0   2024-05-24 [1] CRAN (R 4.4.0)
+#>  vctrs         0.6.5   2023-12-01 [1] CRAN (R 4.4.0)
+#>  xfun          0.44    2024-05-15 [1] CRAN (R 4.4.0)
+#>  yaml          2.3.8   2023-12-11 [1] CRAN (R 4.4.0)
 #> 
 #>  [1] /Users/runner/work/_temp/Library
-#>  [2] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library
+#>  [2] /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
 #> 
 #> ──────────────────────────────────────────────────────────────────────────────
@@ -517,7 +514,7 @@

Session Information

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/authors.html b/authors.html index cb36ac5a..01db9bbf 100644 --- a/authors.html +++ b/authors.html @@ -1,5 +1,5 @@ -Authors and Citation • REDCapRAuthors and Citation • REDCapR @@ -52,7 +52,7 @@
@@ -156,7 +156,7 @@

Citation

-

Site built with pkgdown 2.0.7.

+

Site built with pkgdown 2.0.9.

diff --git a/index.html b/index.html index cd70b25b..265fdf18 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@ - + @@ -20,12 +20,7 @@ - + Changelog • REDCapRChangelog • REDCapR @@ -92,6 +92,7 @@

Possibly Breaking Changeredcap_read() and redcap_read_oneshot() now return an empty dataset if no records are retrieved (such as no records meet the filter criteria). Currently a 0x0 tibble is returned, but that may change in the future. Until now an error was deliberately thrown. (#452)

  • redcap_event_instruments() now by default returns mappings for all arms. The previous default was to return the mappings for only the first arm. To recreate the previous behavior use a call like REDCapR::redcap_event_instruments(uri, token_2, arms = "1"). (Suggested by @januz, #482)

  • +
  • redcap_users_export() used to return a boolean for user_rights, but now it can be 0, 1, or 2. (#523)

  • New Features

    @@ -150,6 +151,8 @@

    Minor Enhancements redcap_read() checks the event parameter and throws an error if a value is not recognized, or the project is not longitudinal (#493)
  • The regex in regex_named_captures() is forgiving if there’s an unnecessary leading space (@BlairCooper, #495, #501)
  • +
  • +redcap_log_read() assumes all columns are character, except for timestamp (#525)
  • @@ -430,7 +433,7 @@

    Enhancements
    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/pkgdown.yml b/pkgdown.yml index c317c40e..878c5174 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -1,15 +1,15 @@ -pandoc: 2.19.2 -pkgdown: 2.0.7 +pandoc: 3.1.11 +pkgdown: 2.0.9 pkgdown_sha: ~ articles: + advanced-redcapr-operations: advanced-redcapr-operations.html BasicREDCapROperations: BasicREDCapROperations.html + longitudinal-and-repeating: longitudinal-and-repeating.html SecurityDatabase: SecurityDatabase.html TroubleshootingApiCalls: TroubleshootingApiCalls.html - advanced-redcapr-operations: advanced-redcapr-operations.html - longitudinal-and-repeating: longitudinal-and-repeating.html workflow-read: workflow-read.html workflow-write: workflow-write.html -last_built: 2024-01-22T17:10Z +last_built: 2024-06-11T17:20Z urls: reference: https://ouhscbbmc.github.io/REDCapR/reference article: https://ouhscbbmc.github.io/REDCapR/articles diff --git a/reference/REDCapR-package.html b/reference/REDCapR-package.html index 576e6d9e..1dcab2aa 100644 --- a/reference/REDCapR-package.html +++ b/reference/REDCapR-package.html @@ -1,7 +1,7 @@ -R utilities for interacting with a REDCap data system -https://www.project-redcap.org/ — REDCapR-package • REDCapRREDCapR: Interaction Between R and REDCap — REDCapR-package • REDCapR
    -

    Comprehensive documentation is also available at +

    +

    Encapsulates functions to streamline calls from R to the REDCap API. REDCap (Research Electronic Data CAPture) is a web application for building and managing online surveys and databases developed at Vanderbilt University. The Application Programming Interface (API) offers an avenue to access and modify data programmatically, improving the capacity for literate and reproducible programming.

    +

    Comprehensive documentation is also available at https://ouhscbbmc.github.io/REDCapR/.

    Much of this package has been developed to support the needs of the following projects. We appreciate the support.

    • OUHSC CCAN Independent Evaluation of the State of Oklahoma Competitive @@ -136,6 +137,35 @@

      Note

      See REDCapR's advanced vignette for information and examples for overriding the default SSL options.

    + +
    +

    Author

    +

    Maintainer: Will Beasley wibeasley@hotmail.com (ORCID)

    +

    Other contributors:

    Examples

    @@ -162,7 +192,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/collapse_vector.html b/reference/collapse_vector.html index 018ee408..ce8a43fd 100644 --- a/reference/collapse_vector.html +++ b/reference/collapse_vector.html @@ -1,5 +1,5 @@ -Collapse a vector of values into a single string when necessary — collapse_vector • REDCapRCollapse a vector of values into a single string when necessary — collapse_vector • REDCapR -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/constant.html b/reference/constant.html index d5c8a9ac..8411f8f4 100644 --- a/reference/constant.html +++ b/reference/constant.html @@ -1,5 +1,5 @@ -Collection of REDCap-specific constants — constant • REDCapRCollection of REDCap-specific constants — constant • REDCapR @@ -192,7 +192,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/create_batch_glossary.html b/reference/create_batch_glossary.html index 52603806..490dc9b1 100644 --- a/reference/create_batch_glossary.html +++ b/reference/create_batch_glossary.html @@ -1,7 +1,5 @@ -Creates a dataset that help batching long-running -read and writes — create_batch_glossary • REDCapRCreates a dataset that help batching long-running read and writes — create_batch_glossary • REDCapR
    @@ -183,7 +180,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/index.html b/reference/index.html index ab730d13..73602367 100644 --- a/reference/index.html +++ b/reference/index.html @@ -1,5 +1,5 @@ -Function reference • REDCapRFunction reference • REDCapR @@ -61,8 +61,7 @@

    Records via the API

    redcap_read()

    -

    Read records from a REDCap project in subsets, and stacks them -together before returning a dataset

    +

    Read records from a REDCap project in subsets, and stacks them together before returning a dataset

    redcap_read_oneshot()

    @@ -172,10 +171,9 @@

    Internals

    Functions and classes used by the methods above.

    -

    REDCapR-package REDCapR

    +

    REDCapR REDCapR-package

    -

    R utilities for interacting with a REDCap data system -https://www.project-redcap.org/

    +

    REDCapR: Interaction Between R and REDCap

    redcap_project

    @@ -195,8 +193,7 @@

    Security

    retrieve_credential_local() retrieve_credential_mssql() create_credential_local()

    -

    Read a token and other credentials from a (non-REDCap) -database or file

    +

    Read a token and other credentials from a (non-REDCap) database or file

    Utilities

    Functions to help the methods above.

    @@ -212,8 +209,7 @@

    Utilities create_batch_glossary()

    -

    Creates a dataset that help batching long-running -read and writes

    +

    Creates a dataset that help batching long-running read and writes

    regex_named_captures() checkbox_choices()

    @@ -233,8 +229,7 @@

    Utilities validate_for_write() validate_data_frame_inherits() validate_no_logical() validate_field_names() validate_record_id_name() validate_repeat_instance() validate_uniqueness()

    -

    Inspect a dataset to anticipate problems before -writing to a REDCap project

    +

    Inspect a dataset to anticipate problems before writing to a REDCap project

    Soft Deprecated

    Functions that have been renamed and will be removed in future REDCapR versions.

    @@ -264,7 +259,7 @@

    Soft Deprecated -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/kernel_api.html b/reference/kernel_api.html index 46bb12b4..31dcfe40 100644 --- a/reference/kernel_api.html +++ b/reference/kernel_api.html @@ -1,5 +1,5 @@ -REDCapR internal function for calling the REDCap API — kernel_api • REDCapRREDCapR internal function for calling the REDCap API — kernel_api • REDCapR @@ -146,7 +146,7 @@

    Examples

    # Consume the results in a few different ways. kernel$result #> Response [https://bbmc.ouhsc.edu/redcap/api/] -#> Date: 2024-01-22 17:10 +#> Date: 2024-06-11 17:20 #> Status: 200 #> Content-Type: text/csv; charset=utf-8 #> Size: 717 B @@ -267,7 +267,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/metadata_utilities.html b/reference/metadata_utilities.html index 9079b973..5189f2e8 100644 --- a/reference/metadata_utilities.html +++ b/reference/metadata_utilities.html @@ -1,5 +1,5 @@ -Manipulate and interpret the metadata of a REDCap project — metadata_utilities • REDCapRManipulate and interpret the metadata of a REDCap project — metadata_utilities • REDCapRExport Arms — redcap_arm_export • REDCapRExport Arms — redcap_arm_export • REDCapR @@ -147,7 +147,7 @@

    Examples

    # Query a classic project with 3 arms token_1 <- "CDF9F3767E413FDBAA31D92E9F36730A" result_1 <- REDCapR::redcap_arm_export(redcap_uri=uri, token=token_1) -#> The list of arms was retrieved from the REDCap project in 0.1 seconds. The http status code was 200. +#> The list of arms was retrieved from the REDCap project in 0.2 seconds. The http status code was 200. result_1$has_arms #> [1] TRUE result_1$data @@ -161,7 +161,7 @@

    Examples

    # Query a classic project without arms token_2 <- "D70F9ACD1EDD6F151C6EA78683944E98" result_2 <- REDCapR::redcap_arm_export(redcap_uri=uri, token=token_2) -#> A 'classic' REDCap project has no arms. Retrieved in 0.1 seconds. The http status code was 400. +#> A 'classic' REDCap project has no arms. Retrieved in 0.2 seconds. The http status code was 400. result_2$has_arms #> [1] FALSE result_2$data @@ -182,7 +182,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_column_sanitize.html b/reference/redcap_column_sanitize.html index 71dec533..5b39c6bb 100644 --- a/reference/redcap_column_sanitize.html +++ b/reference/redcap_column_sanitize.html @@ -1,5 +1,5 @@ -Sanitize to adhere to REDCap character encoding requirements — redcap_column_sanitize • REDCapRSanitize to adhere to REDCap character encoding requirements — redcap_column_sanitize • REDCapRRead data access groups from a REDCap project — redcap_dag_read • REDCapRRead data access groups from a REDCap project — redcap_dag_read • REDCapRDelete records in a REDCap project — redcap_delete • REDCapRDelete records in a REDCap project — redcap_delete • REDCapR @@ -197,7 +197,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_event_instruments.html b/reference/redcap_event_instruments.html index 63d96c00..c6c5580b 100644 --- a/reference/redcap_event_instruments.html +++ b/reference/redcap_event_instruments.html @@ -1,5 +1,5 @@ -Enumerate the instruments to event mappings — redcap_event_instruments • REDCapRExamples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_event_read.html b/reference/redcap_event_read.html index 751443a5..8a2278b1 100644 --- a/reference/redcap_event_read.html +++ b/reference/redcap_event_read.html @@ -1,5 +1,5 @@ -Export Events — redcap_event_read • REDCapRExport Events — redcap_event_read • REDCapR @@ -199,7 +199,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_file_download_oneshot.html b/reference/redcap_file_download_oneshot.html index bcb61f62..9288148c 100644 --- a/reference/redcap_file_download_oneshot.html +++ b/reference/redcap_file_download_oneshot.html @@ -1,5 +1,5 @@ -Download a file from a REDCap project record — redcap_file_download_oneshot • REDCapRDownload a file from a REDCap project record — redcap_file_download_oneshot • REDCapR @@ -216,7 +216,7 @@

    Examples

    base::unlink("mugshot-1.jpg") (full_name <- base::tempfile(pattern="mugshot", fileext = ".jpg")) -#> [1] "/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/mugshot8807454e3a7.jpg" +#> [1] "/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/mugshot15c370b4bcc5.jpg" result_2 <- REDCapR::redcap_file_download_oneshot( file_name = full_name, record = record, @@ -224,8 +224,8 @@

    Examples

    redcap_uri = uri, token = token ) -#> Preparing to download the file `/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/mugshot8807454e3a7.jpg`. -#> image/jpeg; name="mugshot-1.jpg" successfully downloaded in 0.1 seconds, and saved as /var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/mugshot8807454e3a7.jpg. +#> Preparing to download the file `/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/mugshot15c370b4bcc5.jpg`. +#> image/jpeg; name="mugshot-1.jpg" successfully downloaded in 0.1 seconds, and saved as /var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/mugshot15c370b4bcc5.jpg. base::unlink(full_name) (relative_name <- "ssss.jpg") @@ -255,7 +255,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_file_upload_oneshot.html b/reference/redcap_file_upload_oneshot.html index 87d31824..479dae05 100644 --- a/reference/redcap_file_upload_oneshot.html +++ b/reference/redcap_file_upload_oneshot.html @@ -1,5 +1,5 @@ -Upload a file into to a REDCap project record — redcap_file_upload_oneshot • REDCapRUpload a file into to a REDCap project record — redcap_file_upload_oneshot • REDCapR @@ -222,7 +222,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_instrument_download.html b/reference/redcap_instrument_download.html index 938de533..2e8576e2 100644 --- a/reference/redcap_instrument_download.html +++ b/reference/redcap_instrument_download.html @@ -1,5 +1,5 @@ -Download REDCap Instruments — redcap_instrument_download • REDCapRDownload REDCap Instruments — redcap_instrument_download • REDCapR @@ -201,18 +201,18 @@

    Examples

    #> Error in eval(expr, envir, enclos): object 'full_name' not found (full_name <- base::tempfile(pattern="instruments-all-record-1-", fileext = ".pdf")) -#> [1] "/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instruments-all-record-1-88088e4ac6.pdf" +#> [1] "/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instruments-all-record-1-15c35784221f.pdf" result_2 <- REDCapR::redcap_instrument_download( record = 5, file_name = full_name, redcap_uri = uri, token = token ) -#> Preparing to download the file `/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instruments-all-record-1-88088e4ac6.pdf`. -#> text/html; charset=UTF-8 successfully downloaded in 0.2 seconds, and saved as /var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instruments-all-record-1-88088e4ac6.pdf. +#> Preparing to download the file `/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instruments-all-record-1-15c35784221f.pdf`. +#> text/html; charset=UTF-8 successfully downloaded in 0.3 seconds, and saved as /var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instruments-all-record-1-15c35784221f.pdf. base::unlink(full_name) (full_name <- base::tempfile(pattern="instrument-1-record-1-", fileext=".pdf")) -#> [1] "/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instrument-1-record-1-88035cf118d.pdf" +#> [1] "/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instrument-1-record-1-15c323dc4e1c.pdf" result_3 <- REDCapR::redcap_instrument_download( record = 5, instrument = "health", @@ -220,8 +220,8 @@

    Examples

    redcap_uri = uri, token = token ) -#> Preparing to download the file `/var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instrument-1-record-1-88035cf118d.pdf`. -#> text/html; charset=UTF-8 successfully downloaded in 0.2 seconds, and saved as /var/folders/mm/pltwc2yj1jx192t6dzy9zsrr0000gn/T//RtmpVSAzeS/instrument-1-record-1-88035cf118d.pdf. +#> Preparing to download the file `/var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instrument-1-record-1-15c323dc4e1c.pdf`. +#> text/html; charset=UTF-8 successfully downloaded in 0.2 seconds, and saved as /var/folders/lr/439_fwvd3m76p9vy50d57kcc0000gn/T//RtmpHp9whf/instrument-1-record-1-15c323dc4e1c.pdf. base::unlink(full_name) # } @@ -238,7 +238,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_instruments.html b/reference/redcap_instruments.html index 1bec8895..a15c21c3 100644 --- a/reference/redcap_instruments.html +++ b/reference/redcap_instruments.html @@ -1,5 +1,5 @@ -Enumerate the instruments (forms) — redcap_instruments • REDCapREnumerate the instruments (forms) — redcap_instruments • REDCapR -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_log_read.html b/reference/redcap_log_read.html index 2db4bc0e..9d808d9c 100644 --- a/reference/redcap_log_read.html +++ b/reference/redcap_log_read.html @@ -1,5 +1,5 @@ -Get the logging of a project. — redcap_log_read • REDCapRGet the logging of a project. — redcap_log_read • REDCapRSuggests a col_type for each field in a REDCap project — redcap_metadata_coltypes • REDCapRSuggests a col_type for each field in a REDCap project — redcap_metadata_coltypes • REDCapR#> race_and_ethnicity_complete = readr::col_integer() , # completion status of form/instrument #> ) redcap_read_oneshot(uri, token, col_types = col_types)$data -#> 5 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 5 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 5 × 25 #> record_id name_first name_last address telephone email dob age sex #> <chr> <chr> <chr> <chr> <chr> <chr> <date> <chr> <chr> @@ -403,7 +403,7 @@

    Examples

    #> completion_project_questionnaire_complete = readr::col_integer() , # completion status of form/instrument #> ) redcap_read_oneshot(uri, token, col_types = col_types)$data -#> 18 records and 125 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 18 records and 125 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 18 × 125 #> study_id redcap_event_name date_enrolled patient_document first_name #> <chr> <chr> <date> <chr> <chr> @@ -456,7 +456,7 @@

    Examples

    #> bp_complete = readr::col_integer() , # completion status of form/instrument #> ) redcap_read_oneshot(uri, token, col_types = col_types)$data -#> 9 records and 15 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 9 records and 15 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 9 × 15 #> record_id redcap_repeat_instrument redcap_repeat_instance date_enrolled #> <int> <chr> <int> <date> @@ -536,7 +536,7 @@

    Examples

    #> form_1_complete = readr::col_integer() , # completion status of form/instrument #> ) redcap_read_oneshot(uri, token, col_types = col_types)$data -#> 1 records and 52 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 1 records and 52 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 1 × 52 #> record_id f_calculated f_checkbox___0 f_checkbox___1 f_checkbox___2 f_dropdown #> <int> <chr> <lgl> <lgl> <lgl> <chr> @@ -563,7 +563,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_metadata_read.html b/reference/redcap_metadata_read.html index a2e536ab..ef6b083e 100644 --- a/reference/redcap_metadata_read.html +++ b/reference/redcap_metadata_read.html @@ -1,5 +1,5 @@ -Export the metadata of a REDCap project — redcap_metadata_read • REDCapRExport the metadata of a REDCap project — redcap_metadata_read • REDCapRImport metadata of a REDCap project — redcap_metadata_write • REDCapRImport metadata of a REDCap project — redcap_metadata_write • REDCapRDetermine free available record ID — redcap_next_free_record_name • REDCapRDetermine free available record ID — redcap_next_free_record_name • REDCapR @@ -125,24 +125,24 @@

    Note

    exports the next potential record ID for a project. It generates the next record name by determining the current maximum numerical record ID and then incrementing it by one.

    -

    Note: This method does not create a new record, but merely determines what
    -the next record name would be.
    -
    -If using Data Access Groups (DAGs) in the project, this method accounts for
    -the special formatting of the record name for users in DAGs (e.g., DAG-ID);
    -in this case, it only assigns the next value for ID for all numbers inside
    -a DAG. For example, if a DAG has a corresponding DAG number of 223 wherein
    -records 223-1 and 223-2 already exist, then the next record will be 223-3
    -if the API user belongs to the DAG that has DAG number 223. (The DAG number
    -is auto-assigned by REDCap for each DAG when the DAG is first created.)
    -
    -When generating a new record name in a DAG, the method considers all records
    -in the entire project when determining the maximum record ID, including
    -those that might have been originally created in that DAG but then later
    -reassigned to another DAG.
    -
    -Note: This method functions the same even for projects that do not have
    -record auto-numbering enabled.

    +

    Note: This method does not create a new record, but merely determines what
    +the next record name would be.
    +
    +If using Data Access Groups (DAGs) in the project, this method accounts for
    +the special formatting of the record name for users in DAGs (e.g., DAG-ID);
    +in this case, it only assigns the next value for ID for all numbers inside
    +a DAG. For example, if a DAG has a corresponding DAG number of 223 wherein
    +records 223-1 and 223-2 already exist, then the next record will be 223-3
    +if the API user belongs to the DAG that has DAG number 223. (The DAG number
    +is auto-assigned by REDCap for each DAG when the DAG is first created.)
    +
    +When generating a new record name in a DAG, the method considers all records
    +in the entire project when determining the maximum record ID, including
    +those that might have been originally created in that DAG but then later
    +reassigned to another DAG.
    +
    +Note: This method functions the same even for projects that do not have
    +record auto-numbering enabled.

    @@ -167,7 +167,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_project.html b/reference/redcap_project.html index e5903dd7..917732e1 100644 --- a/reference/redcap_project.html +++ b/reference/redcap_project.html @@ -1,5 +1,5 @@ -A Reference Class to make later calls to REDCap more convenient — redcap_project • REDCapRA Reference Class to make later calls to REDCap more convenient — redcap_project • REDCapRExport project information. — redcap_project_info_read • REDCapRExport project information. — redcap_project_info_read • REDCapRRead records from a REDCap project in subsets, and stacks them -together before returning a dataset — redcap_read • REDCapRRead records from a REDCap project in subsets, and stacks them together before returning a dataset — redcap_read • REDCapR
    @@ -314,8 +311,8 @@

    Batching subsets of data

    each batch is smaller than the entire dataset, the webserver tackles more manageably sized objects in memory. Consider batching if you encounter the error:

    -

    ERROR: REDCap ran out of server memory. The request cannot be processed.
    -Please try importing/exporting a smaller amount of data.

    +

    ERROR: REDCap ran out of server memory. The request cannot be processed.
    +Please try importing/exporting a smaller amount of data.

    A third benefit (compared to redcap_read()) is that important fields are included, even if not explicitly requested. As a result:

    1. record_id (or it's customized name) will always be returned

    2. redcap_event_name will be returned for longitudinal projects

    3. @@ -358,7 +355,7 @@

      Pseudofields

      named demographics_timestamp. REDCapR does not suppress requests for timestamps, so the server will throw an error like

      -

      ERROR: The following values in the parameter fields are not valid: 'demographics_timestamp'

      +

      ERROR: The following values in the parameter fields are not valid: 'demographics_timestamp'

    Events

    @@ -405,14 +402,14 @@

    Examples

    #> 3 instrument metadata records were read from REDCap in 0.1 seconds. The http status code was 200. #> 1 rows were read from REDCap in 0.1 seconds. The http status code was 200. #> 2 data access groups were read from REDCap in 0.1 seconds. The http status code was 200. -#> 5 records and 1 columns were read from REDCap in 0.1 seconds. The http status code was 200. -#> Starting to read 5 records at 2024-01-22 17:10:51.976842. +#> 5 records and 1 columns were read from REDCap in 0.2 seconds. The http status code was 200. +#> Starting to read 5 records at 2024-06-11 17:20:53.579703. #> Reading batch 1 of 3, with subjects 1 through 2 (ie, 2 unique subject records). -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 2 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> Reading batch 2 of 3, with subjects 3 through 4 (ie, 2 unique subject records). -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 2 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> Reading batch 3 of 3, with subjects 5 through 5 (ie, 1 unique subject records). -#> 1 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 1 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 5 × 25 #> record_id name_first name_last address telephone email dob age sex #> <dbl> <chr> <chr> <chr> <chr> <chr> <date> <dbl> <dbl> @@ -448,14 +445,14 @@

    Examples

    #> 3 instrument metadata records were read from REDCap in 0.1 seconds. The http status code was 200. #> 1 rows were read from REDCap in 0.1 seconds. The http status code was 200. #> 2 data access groups were read from REDCap in 0.1 seconds. The http status code was 200. -#> 5 records and 1 columns were read from REDCap in 0.1 seconds. The http status code was 200. -#> Starting to read 5 records at 2024-01-22 17:10:55.37869. +#> 5 records and 1 columns were read from REDCap in 0.2 seconds. The http status code was 200. +#> Starting to read 5 records at 2024-06-11 17:20:56.843839. #> Reading batch 1 of 3, with subjects 1 through 2 (ie, 2 unique subject records). -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 2 records and 25 columns were read from REDCap in 0.3 seconds. The http status code was 200. #> Reading batch 2 of 3, with subjects 3 through 4 (ie, 2 unique subject records). -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 2 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> Reading batch 3 of 3, with subjects 5 through 5 (ie, 1 unique subject records). -#> 1 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 1 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. #> # A tibble: 5 × 25 #> record_id name_first name_last address telephone email dob age sex #> <int> <chr> <chr> <chr> <chr> <chr> <date> <dbl> <dbl> @@ -484,7 +481,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_read_eav_oneshot.html b/reference/redcap_read_eav_oneshot.html index ca019d6a..912d1ce3 100644 --- a/reference/redcap_read_eav_oneshot.html +++ b/reference/redcap_read_eav_oneshot.html @@ -1,5 +1,5 @@ -Read/Export records from a REDCap project, returned as eav — redcap_read_eav_oneshot • REDCapRRead/Export records from a REDCap project, returned as eav — redcap_read_eav_oneshot • REDCapRRead/Export records from a REDCap project — redcap_read_oneshot • REDCapRRead/Export records from a REDCap project — redcap_read_oneshot • REDCapR @@ -286,7 +286,7 @@

    Details

    named demographics_timestamp. REDCapR does not suppress requests for timestamps, so the server will throw an error like

    -

    ERROR: The following values in the parameter fields are not valid: 'demographics_timestamp'

    +

    ERROR: The following values in the parameter fields are not valid: 'demographics_timestamp'

    References

    @@ -310,7 +310,7 @@

    Examples

    # Return all records and all variables. ds <- REDCapR::redcap_read_oneshot(redcap_uri=uri, token=token)$data -#> 5 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 5 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. # Return only records with IDs of 1 and 3 desired_records_v1 <- c(1, 3) @@ -319,7 +319,7 @@

    Examples

    token = token, records = desired_records_v1 )$data -#> 2 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 2 records and 25 columns were read from REDCap in 0.2 seconds. The http status code was 200. # Return only the fields record_id, name_first, and age desired_fields_v1 <- c("record_id", "name_first", "age") @@ -328,7 +328,7 @@

    Examples

    token = token, fields = desired_fields_v1 )$data -#> 5 records and 3 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 5 records and 3 columns were read from REDCap in 0.2 seconds. The http status code was 200. # Specify the column types. col_types <- readr::cols( @@ -345,7 +345,7 @@

    Examples

    token = token, col_types = col_types )$data -#> 5 records and 25 columns were read from REDCap in 0.1 seconds. The http status code was 200. +#> 5 records and 25 columns were read from REDCap in 0.4 seconds. The http status code was 200. # }
    @@ -361,7 +361,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_read_oneshot_eav.html b/reference/redcap_read_oneshot_eav.html index b0b61bcf..918db417 100644 --- a/reference/redcap_read_oneshot_eav.html +++ b/reference/redcap_read_oneshot_eav.html @@ -1,5 +1,5 @@ -Read/Export records from a REDCap project --still in development — redcap_read_oneshot_eav • REDCapRRead/Export records from a REDCap project --still in development — redcap_read_oneshot_eav • REDCapRRead/Export records that populate a REDCap report — redcap_report • REDCapRRead/Export records that populate a REDCap report — redcap_report • REDCapRDownload a file from a REDCap project record — redcap_survey_link_export_oneshot • REDCapRDownload a file from a REDCap project record — redcap_survey_link_export_oneshot • REDCapR @@ -196,7 +196,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_users_export.html b/reference/redcap_users_export.html index ba08e56a..94fcd215 100644 --- a/reference/redcap_users_export.html +++ b/reference/redcap_users_export.html @@ -1,5 +1,5 @@ -List authorized users — redcap_users_export • REDCapRList authorized users — redcap_users_export • REDCapR @@ -125,12 +125,12 @@

    Value

    Note

    Documentation in REDCap 8.4.0

    -

    This method allows you to export the list of users for a project,
    -including their user privileges and also email address, first name,
    -and last name.
    -
    -Note: If the user has been assigned to a user role, it will return
    -the user with the role's defined privileges.

    +

    This method allows you to export the list of users for a project,
    +including their user privileges and also email address, first name,
    +and last name.
    +
    +Note: If the user has been assigned to a user role, it will return
    +the user with the role's defined privileges.

    @@ -141,18 +141,18 @@

    Examples

    result <- REDCapR::redcap_users_export(redcap_uri=uri, token=token) #> The REDCap users were successfully exported in 0.1 seconds. The http status code was 200. result$data_user -#> # A tibble: 2 × 32 +#> # A tibble: 2 × 33 #> username email firstname lastname expiration data_access_group #> <chr> <chr> <chr> <chr> <date> <chr> #> 1 unittestphifree wibeasley@hot… Unit Test PHI Free NA daga #> 2 wbeasleya william-beasl… Will Beasley… NA NA -#> # ℹ 26 more variables: data_access_group_id <chr>, design <lgl>, alerts <dbl>, -#> # user_rights <lgl>, data_access_groups <lgl>, reports <lgl>, +#> # ℹ 27 more variables: data_access_group_id <chr>, design <lgl>, alerts <dbl>, +#> # user_rights <int>, data_access_groups <lgl>, reports <lgl>, #> # stats_and_charts <lgl>, manage_survey_participants <lgl>, calendar <lgl>, #> # data_import_tool <lgl>, data_comparison_tool <lgl>, logging <lgl>, #> # file_repository <lgl>, data_quality_create <lgl>, #> # data_quality_execute <lgl>, api_export <lgl>, api_import <lgl>, -#> # mobile_app <lgl>, mobile_app_download_data <lgl>, record_create <lgl>, … +#> # api_modules <dbl>, mobile_app <lgl>, mobile_app_download_data <lgl>, … result$data_user_form #> # A tibble: 2 × 4 #> username form_name permission_id permission @@ -174,7 +174,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_variables.html b/reference/redcap_variables.html index dcd70ed3..2dd2b310 100644 --- a/reference/redcap_variables.html +++ b/reference/redcap_variables.html @@ -1,5 +1,5 @@ -Enumerate the exported variables — redcap_variables • REDCapREnumerate the exported variables — redcap_variables • REDCapRDetermine version of REDCap instance — redcap_version • REDCapRDetermine version of REDCap instance — redcap_version • REDCapR @@ -126,8 +126,8 @@

    Examples

    uri      <- "https://bbmc.ouhsc.edu/redcap/api/"
     token    <- "9A81268476645C4E5F03428B8AC3AA7B"
     REDCapR::redcap_version(redcap_uri = uri, token = token)
    -#> The REDCap version was successfully determined in 0.1 seconds. The http status code was 200.  Is is 13.10.3.
    -#> [1] ‘13.10.3’
    +#> The REDCap version was successfully determined in 0.1 seconds. The http status code was 200.  Is is 14.3.13.
    +#> [1] ‘14.3.13’
     
    @@ -142,7 +142,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_write.html b/reference/redcap_write.html index b2852da5..f02a38c0 100644 --- a/reference/redcap_write.html +++ b/reference/redcap_write.html @@ -1,5 +1,5 @@ -Write/Import records to a REDCap project — redcap_write • REDCapRWrite/Import records to a REDCap project — redcap_write • REDCapR @@ -235,7 +235,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/redcap_write_oneshot.html b/reference/redcap_write_oneshot.html index c45ddb95..d7279ae4 100644 --- a/reference/redcap_write_oneshot.html +++ b/reference/redcap_write_oneshot.html @@ -1,5 +1,5 @@ -Write/Import records to a REDCap project — redcap_write_oneshot • REDCapRWrite/Import records to a REDCap project — redcap_write_oneshot • REDCapR @@ -213,7 +213,7 @@

    Examples

    -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/replace_nas_with_explicit.html b/reference/replace_nas_with_explicit.html index 7725d34c..0c636550 100644 --- a/reference/replace_nas_with_explicit.html +++ b/reference/replace_nas_with_explicit.html @@ -1,5 +1,5 @@ -Create explicit factor level for missing values — replace_nas_with_explicit • REDCapRCreate explicit factor level for missing values — replace_nas_with_explicit • REDCapRRead a token and other credentials from a (non-REDCap) -database or file — retrieve_credential • REDCapRRead a token and other credentials from a (non-REDCap) database or file — retrieve_credential • REDCapRValidate and sanitize the user's REDCap token — sanitize_token • REDCapRValidate and sanitize the user's REDCap token — sanitize_token • REDCapR -

    Site built with pkgdown 2.0.7.

    +

    Site built with pkgdown 2.0.9.

    diff --git a/reference/to_api_array.html b/reference/to_api_array.html index 948bd559..24ad652a 100644 --- a/reference/to_api_array.html +++ b/reference/to_api_array.html @@ -1,5 +1,5 @@ -Convert a vector to the array format expected by the REDCap API — to_api_array • REDCapRConvert a vector to the array format expected by the REDCap API — to_api_array • REDCapRInspect a dataset to anticipate problems before -writing to a REDCap project — validate • REDCapRInspect a dataset to anticipate problems before writing to a REDCap project — validate • REDCapR