Skip to content

Commit

Permalink
Force to create a dir
Browse files Browse the repository at this point in the history
  • Loading branch information
henrykironde committed Aug 7, 2024
1 parent a08a537 commit b324e1b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vignettes/rodent-abundance-demo.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ First, we try to load the data. If there isn't a Portal folder, than `load_roden
check whether we already have the data. If we don't have the data, or if the version we have isn't the most recent, we use the `download_observations` function to download the latest copy of the data.

```{r}
portal_data_path <- tempdir() # use a temporary folder to store downloaded data
if (!dir.exists(portal_data_path)) {
dir.create(portal_data_path)
}
data_tables <- load_rodent_data(portal_data_path, download_if_missing = TRUE)
```

The `load_rodent_data` function reads in several tables related to the rodent abundances. We won't necessarily use all of these tables, but loading this now gives us access later.
Expand All @@ -81,6 +86,7 @@ print(summary(rodent_abundance))
```

Let's convert the data to long format for easier facetting. Also, we want the scientific names instead of the two-letter species codes, so let's do that matching, too:

```{r}
join_scientific_name <- function(rodent_abundance,
species_table = data_tables$species_table)
Expand Down Expand Up @@ -225,7 +231,6 @@ rodent_abundance_control %>%
print()
```


## Abundances over rodent exclosures

We can do the same with the "exclosure" condition. First, which plots:
Expand Down

0 comments on commit b324e1b

Please sign in to comment.