Skip to content

Commit

Permalink
changing file paths and configuring local data reads with here()
Browse files Browse the repository at this point in the history
  • Loading branch information
jtlandis committed Jun 19, 2024
1 parent c10c0de commit 30e55fe
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ book:
- "class7.qmd"
- part: "class8.qmd"
chapters:
- deprecates/scripts/04_projects/project-day-2-files/example-analyses/example-temperatures.qmd
- deprecates/scripts/04_projects/project-day-2-files/example-analyses/example-ebola.qmd
- deprecates/scripts/04_projects/project-day-2-files/example-analyses/example-avida.qmd
- examples/example-temperatures.qmd
- examples/example-ebola.qmd
- examples/example-avida.qmd



Expand Down
8 changes: 5 additions & 3 deletions examples/example-avida.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ format:

```{r setup, echo=FALSE, include=FALSE}
library(tidyverse)
wt <- read.csv("../datasets/avida/avida_wildtype.csv", header = TRUE, sep = ",")
mut <- read.csv("../datasets/avida/avida_mutant.csv", header = TRUE, sep = ",")
comp <- read.csv("../datasets/avida/avida_competition.csv", header = TRUE, sep = ",")
library(here)
data_path <- "data/project-day-2-files/datasets/avida"
wt <- read.csv(here(data_path, "avida_wildtype.csv"), header = TRUE, sep = ",")
mut <- read.csv(here(data_path, "avida_mutant.csv"), header = TRUE, sep = ",")
comp <- read.csv(here(data_path, "avida_competition.csv"), header = TRUE, sep = ",")
```

# Preamble
Expand Down
4 changes: 3 additions & 1 deletion examples/example-ebola.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ format:

```{r setup, echo=FALSE, include=FALSE}
library(tidyverse)
ebola <- read.csv("../datasets/ebola.csv", header = TRUE, sep = ",")
library(here)
data_path <- "data/project-day-2-files/datasets"
ebola <- read.csv(here(data_path, "ebola.csv"), header = TRUE, sep = ",")
```

# Preamble
Expand Down
4 changes: 3 additions & 1 deletion examples/example-temperatures.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ format:

```{r setup, echo=FALSE, include=FALSE}
library(tidyverse)
temps <- read.csv("../datasets/temperatures.csv", header = TRUE, sep = ",")
library(here)
data_path <- "data/project-day-2-files/datasets"
temps <- read.csv(here(data_path, "temperatures.csv"), header = TRUE, sep = ",")
```

# Preamble
Expand Down

0 comments on commit 30e55fe

Please sign in to comment.