-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #38 from tmills-usgs/master
ISsue fix and test
- Loading branch information
Showing
4 changed files
with
40 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.Rproj.user | ||
.Rproj | ||
.Rhistory | ||
.RData | ||
README.md |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
context("frequency indicators") | ||
|
||
###load the data upfront | ||
load("data/sampleData.RData") | ||
qfiletempf <- sampleData | ||
|
||
test_that("fh1.2 test", { | ||
expect_equal(fh1.2(qfiletempf),list(fh1=16, | ||
fh2=44.19)) | ||
}) | ||
|
||
test_that("fh10 test", { | ||
expect_equal(fh10(qfiletempf),2) | ||
}) | ||
|
||
test_that("fh11 test", { | ||
sites<-"02178400" | ||
peakValues<-getPeakData(sites) | ||
thresh<-1158.495 | ||
|
||
expect_equal(fh11(qfiletempf,thresh),1.5) | ||
}) | ||
|
||
test_that("fh3 test", { | ||
expect_equal(fh3(qfiletempf),14) | ||
}) |