Skip to content

Commit 046a8ad

Browse files
committed
guard against variable not existing if vignette does not get compiled
1 parent 9272674 commit 046a8ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

vignettes/partial_table_data_download.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bp_template_filtered <- bp_template %>%
4848
bp_template_filtered
4949
```
5050

51-
This leaves us with `r nrow(bp_template_filtered)` coordinates from the table. To get data for just this subset of the table we feed that into the `get_cansim_data_for_table_coord_periods` function. By default this will get the data for all available times, we could narrow it down to the latest $n$ periods using the `periods` argument, but here we want to get all available data.
51+
This leaves us with `r if (exists("bp_template_filtered")) nrow(bp_template_filtered) else 96` coordinates from the table. To get data for just this subset of the table we feed that into the `get_cansim_data_for_table_coord_periods` function. By default this will get the data for all available times, we could narrow it down to the latest $n$ periods using the `periods` argument, but here we want to get all available data.
5252

5353
```{r}
5454
bp_data <- get_cansim_data_for_table_coord_periods(bp_template_filtered)

0 commit comments

Comments
 (0)