Skip to content

Commit

Permalink
fixing tests for color update, fix example for training data on seagr…
Browse files Browse the repository at this point in the history
…ass vignette
  • Loading branch information
fawda123 committed Jul 1, 2022
1 parent 3bdc44c commit d67c016
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions tests/testthat/test-anlz_transectave.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ test_that("Checking results for anlz_transectave", {
results <- results[1, ]
expect_equal(results, structure(list(yr = 1998, bay_segment = structure(1L, .Label = c("Tampa Bay",
"OTB", "HB", "MTB", "LTB", "BCB"), class = "factor"), foest = 69.5422696525089,
focat = structure(3L, .Label = c("red", "orange", "yellow",
"green"), class = "factor")), row.names = c(NA, -1L), class = c("tbl_df",
"tbl", "data.frame")))
focat = structure(3L, .Label = c("#CC3231", "#EE7600", "#E9C318",
"#2DC938"), class = "factor")), row.names = c(NA, -1L), class = c("tbl_df",
"tbl", "data.frame")))
})

test_that("Checking results for anlz_transectave, rev = T", {
Expand All @@ -17,8 +17,8 @@ test_that("Checking results for anlz_transectave, rev = T", {
results <- results[1, ]
expect_equal(results, structure(list(yr = 1998, bay_segment = structure(1L, .Label = c("BCB",
"LTB", "MTB", "HB", "OTB", "Tampa Bay"), class = "factor"), foest = 81.5079365079365,
focat = structure(4L, .Label = c("red", "orange", "yellow",
"green"), class = "factor")), row.names = c(NA, -1L), class = c("tbl_df",
"tbl", "data.frame")))
focat = structure(4L, .Label = c("#CC3231", "#EE7600", "#E9C318",
"#2DC938"), class = "factor")), row.names = c(NA, -1L), class = c("tbl_df",
"tbl", "data.frame")))
})

2 changes: 1 addition & 1 deletion vignettes/seagrasstransect.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ transectavespp
There is one plotting function for the training data. The `show_compplot()` function is used to compare training data between crews for a selected species (`species` argument) and variable (`varplo` argument).

```{r, fig.height = 5, fig.width = 7}
show_compplot(traindat, yr = 2021, site = '1', species = 'Halodule', varplo = 'Abundance', base_size = 14)
show_compplot(traindat, yr = 2021, site = '2', species = 'Halodule', varplo = 'Abundance', base_size = 14)
```

The rest of the plotting functions work with the complete transect data. Data for an individual transect can be viewed with the `show_transect()` function by entering the transect (site) number, species (one to many), and variable to plot. The plot shows relative values for the selected species and variable by distance along the transect (x-axis) and year of sampling (y-axis). The plots provide an overall summary of temporal and spatial changes in the selected seagrass metric for an individual location.
Expand Down

0 comments on commit d67c016

Please sign in to comment.