Skip to content

Commit

Permalink
Merge pull request #3 from pbchase/issue_2
Browse files Browse the repository at this point in the history
Use here::here() to prevent relative path errors
  • Loading branch information
skadauke authored Jun 11, 2024
2 parents 3cbb30d + 4085e80 commit 549eeab
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion exercises/00_welcome.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The following two code chunks will use the **REDCapR** package to connect to a R
```{r}
library(REDCapR)
creds <- retrieve_credential_local("../data-private/credentials.csv", 1)
creds <- retrieve_credential_local(here::here("data-private", "credentials.csv"), 1)
uri <- creds$redcap_uri
token <- creds$token
Expand Down
2 changes: 1 addition & 1 deletion exercises/01a_redcapr.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ We'll discuss token approaches at the end of the deep dive. For now, know that a
<!-- path_credential <- "redcapcon_2023_redcap_r_workshop/data-private/credentials.csv" -->

```{r}
path_credential <- "../data-private/credentials.csv"
path_credential <- here::here("data-private", "credentials.csv")
credential <- REDCapR::retrieve_credential_local(path_credential, 1L)
credential
```
Expand Down
2 changes: 1 addition & 1 deletion exercises/01b_extract_explore.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this exercise, we will download REDCap data using REDCapTidier (as opposed to
library(REDCapTidieR)
# Load credentials from CSV file
creds <- REDCapR::retrieve_credential_local("../data-private/credentials.csv", 1)
creds <- REDCapR::retrieve_credential_local(here::here("data-private", "credentials.csv"), 1)
uri <- creds$redcap_uri
token <- creds$token
Expand Down
2 changes: 1 addition & 1 deletion exercises/exercise-1a.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# install.packages("remotes")
# remotes::install_github("OuhscBbmc/REDCapR")
path_credential <- "redcapcon_2023_redcap_r_workshop/data-private/credentials.csv"
path_credential <- here::here("data-private", "credentials.csv")
credential <- REDCapR::retrieve_credential_local(path_credential, 1L)

if (FALSE) {
Expand Down
2 changes: 1 addition & 1 deletion solutions/00_welcome.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following code chunk will use the **REDCapR** package to connect to a REDCap
```{r}
library(REDCapR)
creds <- retrieve_credential_local("../data-private/credentials.csv", 1)
creds <- retrieve_credential_local(here::here("data-private", "credentials.csv"), 1)
uri <- creds$redcap_uri
token <- creds$token
Expand Down
2 changes: 1 addition & 1 deletion solutions/01b_extract_explore.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In this exercise, we will download REDCap data using REDCapTidier (as opposed to
library(REDCapTidieR)
# Load credentials from CSV file
creds <- REDCapR::retrieve_credential_local("../data-private/credentials.csv", 1)
creds <- REDCapR::retrieve_credential_local(here::here("data-private", "credentials.csv"), 1)
uri <- creds$redcap_uri
token <- creds$token
Expand Down
2 changes: 1 addition & 1 deletion solutions/04_recreate_extend.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ In this section, your challenge is to work with your small group to recreate the
library(REDCapR)
creds <- retrieve_credential_local("../data-private/credentials.csv", 1)
creds <- retrieve_credential_local(here::here("data-private", "credentials.csv"), 1)
uri <- creds$redcap_uri
token <- creds$token
Expand Down

0 comments on commit 549eeab

Please sign in to comment.