Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Water
dataRetrieval
Commits
802ffb11
Commit
802ffb11
authored
Nov 03, 2021
by
Laura A DeCicco
Browse files
internalling this?
parent
629d8295
Changes
2
Hide whitespace changes
Inline
Side-by-side
R/checkWQPdates.r
View file @
802ffb11
...
@@ -5,12 +5,7 @@
...
@@ -5,12 +5,7 @@
#'
#'
#' @param values named list with arguments to send to the Water Quality Portal
#' @param values named list with arguments to send to the Water Quality Portal
#' @return values named list with corrected arguments to send to the Water Quality Portal
#' @return values named list with corrected arguments to send to the Water Quality Portal
#' @export
#' @keywords internal
#' @keywords internal
#' @examples
#' values <- list(startDateLo="01-01-2002", characteristicName="Phosphorous",
#' endDate=as.Date("2014-01-01"))
#' values <- checkWQPdates(values)
checkWQPdates
<-
function
(
values
){
checkWQPdates
<-
function
(
values
){
dateNames
<-
c
(
"startDateLo"
,
"startDateHi"
,
"startDate"
,
"endDate"
)
dateNames
<-
c
(
"startDateLo"
,
"startDateHi"
,
"startDate"
,
"endDate"
)
...
...
tests/testthat/tests_userFriendly_fxns.R
View file @
802ffb11
...
@@ -372,15 +372,6 @@ test_that("Construct WQP urls", {
...
@@ -372,15 +372,6 @@ test_that("Construct WQP urls", {
expect_equal
(
obs_url_orig
,
"https://www.waterqualitydata.us/data/Result/search?siteid=IIDFG-41WSSPAHS;USGS-02352560&characteristicName=Temperature;Temperature%2C%20sample;Temperature%2C%20water;Temperature%2C%20water%2C%20deg%20F&mimeType=tsv&zip=yes"
)
expect_equal
(
obs_url_orig
,
"https://www.waterqualitydata.us/data/Result/search?siteid=IIDFG-41WSSPAHS;USGS-02352560&characteristicName=Temperature;Temperature%2C%20sample;Temperature%2C%20water;Temperature%2C%20water%2C%20deg%20F&mimeType=tsv&zip=yes"
)
})
})
context
(
"checkWQPdates"
)
test_that
(
"checkWQPdates"
,
{
values
<-
list
(
startDateLo
=
"01-01-2002"
,
characteristicName
=
"Phosphorous"
,
endDate
=
as.Date
(
"2014-01-01"
))
values1
<-
checkWQPdates
(
values
)
expect_equal
(
values1
$
startDateHi
,
"01-01-2014"
)
expect_equal
(
values1
$
startDateLo
,
"01-01-2002"
)
})
context
(
"Construct WQP urls"
)
context
(
"Construct WQP urls"
)
test_that
(
"Construct WQP urls"
,
{
test_that
(
"Construct WQP urls"
,
{
siteNumber
<-
'01594440'
siteNumber
<-
'01594440'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment