-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de66bc9
commit e3a8ca3
Showing
9 changed files
with
88 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
y <- system.file("das_sample.das", package = "swfscDAS") | ||
|
||
y.read <- das_read(y, skip = 20, tz = "GMT") | ||
y.proc <- das_process(y.read, reset.effort = FALSE) | ||
|
||
event.sight <- c("S", "K", "M", "G", "s", "k", "m", "g", "t", "p", "F", | ||
"A", "?", 1:8) | ||
|
||
|
||
|
||
test_that("The column classes of the das_sight 'default' output are the same whether or not there is sighting data", { | ||
y.sight <- dplyr::filter(das_sight(y.proc, return.format = "default"), | ||
Event == "ZZ") | ||
|
||
y.sight0 <- y.proc %>% | ||
filter(!(Event %in% event.sight)) %>% | ||
das_sight(return.format = "default") | ||
|
||
expect_identical(y.sight, y.sight0) | ||
}) | ||
|
||
|
||
test_that("The column classes of the das_sight 'wide' output, are the same whether or not there is sighting data", { | ||
y.sight <- dplyr::filter(das_sight(y.proc, return.format = "wide"), | ||
Event == "ZZ") | ||
|
||
y.sight0 <- y.proc %>% | ||
filter(!(Event %in% event.sight)) %>% | ||
das_sight(return.format = "wide") | ||
|
||
expect_identical(y.sight, y.sight0) | ||
}) | ||
|
||
|
||
test_that("The column classes of the das_sight 'complete' output are the same whether or not there is sighting data", { | ||
y.sight <- dplyr::filter(das_sight(y.proc, return.format = "complete"), | ||
Event == "ZZ") | ||
|
||
y.sight0 <- y.proc %>% | ||
filter(!(Event %in% event.sight)) %>% | ||
das_sight(return.format = "complete") | ||
|
||
expect_identical(y.sight, y.sight0) | ||
}) |