Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use here::here() to prevent relative path errors #3

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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