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
6747f85b
Commit
6747f85b
authored
Apr 26, 2019
by
Laura A DeCicco
Browse files
Remembering to add the sorting back in.
parent
0a7ddd97
Changes
2
Hide whitespace changes
Inline
Side-by-side
NEWS
View file @
6747f85b
...
...
@@ -3,6 +3,8 @@ dataRetrieval 2.7.5
* Fixed some time zone joining bugs that were happening if the timezone column had no information in the first ~100 returned rows.
* Changed WQP default behavior to a zip return
* Remove reshape2 and dplyr dependencies
* Added ability to customize user agent using options UA.dataRetrieval
*
dataRetrieval 2.7.3
==========
...
...
R/importWaterML1.r
View file @
6747f85b
...
...
@@ -198,7 +198,7 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz="UTC"){
#^^setting tz in as.POSIXct just sets the attribute, does not convert the time!
attr
(
dateTime
,
'tzone'
)
<-
tz
tzCol
<-
rep
(
tz
,
nObs
)
}
else
{
}
else
{
tzCol
<-
rep
(
defaultTZ
,
nObs
)
}
#create column names, addressing if methodDesc is needed
...
...
@@ -337,8 +337,8 @@ importWaterML1 <- function(obs_url,asDateTime=FALSE, tz="UTC"){
mergedNames
<-
names
(
mergedDF
)
tzLoc
<-
grep
(
"tz_cd"
,
names
(
mergedDF
))
mergedDF
<-
mergedDF
[
c
(
mergedNames
[
-
tzLoc
],
mergedNames
[
tzLoc
])]
#Need to yet order by site_no, dateTime:
#
mergedDF <- mergedDF[
,c(site_no,
dateTime)]
mergedDF
<-
mergedDF
[
order
(
mergedDF
$
site_no
,
mergedDF
$
dateTime
)
,
]
###############################################################
names
(
mergedDF
)
<-
make.names
(
names
(
mergedDF
))
...
...
@@ -403,7 +403,7 @@ check_if_xml <- function(obs_url){
if
(
class
(
obs_url
)
==
"character"
&&
file.exists
(
obs_url
)){
returnedDoc
<-
read_xml
(
obs_url
)
}
else
if
(
class
(
obs_url
)
==
'raw'
){
}
else
if
(
class
(
obs_url
)
==
'raw'
){
returnedDoc
<-
read_xml
(
obs_url
)
}
else
if
(
inherits
(
obs_url
,
c
(
"xml_node"
,
"xml_nodeset"
)))
{
returnedDoc
<-
obs_url
...
...
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