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
c4a59776
Commit
c4a59776
authored
Sep 24, 2021
by
Blodgett, David L.
Browse files
quote handling -- fixes #583
parent
629d8295
Changes
2
Show whitespace changes
Inline
Side-by-side
R/importRDB1.r
View file @
c4a59776
...
...
@@ -135,6 +135,7 @@ importRDB1 <- function(obs_url, asDateTime=TRUE, convertType = TRUE, tz="UTC"){
if
(
data.rows
>
0
){
args_list
<-
list
(
file
=
f
,
delim
=
"\t"
,
quote
=
""
,
skip
=
meta.rows
+
2
,
col_names
=
FALSE
)
if
(
utils
::
packageVersion
(
"readr"
)
>
1.4
){
...
...
tests/testthat/tests_imports.R
View file @
c4a59776
...
...
@@ -44,6 +44,24 @@ test_that("External importRDB1 tests", {
statCd
=
"laksjd"
)
# And....now there's data there:
expect_null
(
importRDB1
(
url
))
site
<-
"11486500"
url
<-
dataRetrieval
:::
drURL
(
"site"
,
arg.list
=
list
(
siteOutput
=
"Expanded"
,
format
=
"rdb"
,
site
=
site
))
site_data
<-
importRDB1
(
url
)
expect_equal
(
site_data
$
station_nm
,
"\"G\" CANAL NEAR OLENE,OREG."
)
site
<-
"040854588204"
url
<-
dataRetrieval
:::
drURL
(
"site"
,
arg.list
=
list
(
siteOutput
=
"Expanded"
,
format
=
"rdb"
,
site
=
site
))
site_data
<-
importRDB1
(
url
)
expect_equal
(
site_data
$
station_nm
,
"\"FISHER CR AT 32 & HIGHLAND RD AT HOWARDS GROVE, W"
)
})
context
(
"importRDB"
)
...
...
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