Displaying 20 results from an estimated 600 matches similar to: "Parsing Files in R (USGS StreamFlow data)"
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly.
when I use it like USGS(input="precipitation") it is choking on the
precip.1 <- subset(DF, precipitation!="NA")
b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum)
DF.precip <- precip.1
DF.precip$precipitation <- b$.data
part, but runs fine outside of the function:
days=7
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question
#here is a little function that I wrote
USGS <- function(input="discharge", days=7){
library(chron)
library(gsubfn)
#021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS)
#02102908 is the Flat Creek Gauge (ftbrfcms)
#02133500 is the Drowning Creek (ftbrbmcm)
#02341800 is the Upatoi Creek Near Columbus (ftbn)
#02342500 is
2009 Jul 30
1
USGS stream flow data automatic download R
I don't even know if this is the right place to ask this question. I
would like to download USGS stream gauging data for a couple of gauges
on a daily basis- save the files to .csv files and append the nest
days time series to this. Is there a way to do this automatically in
R?
thanks,
--
Stephen Sefick
Let's not spend our time and resources thinking about things that are
so little or
2009 Jul 21
0
help for SSOAP
Hi,
I am trying to learn how to from within R access web services. I am also interested in having R be a client and from within R access data on other web services. Specifically the web services I would like to access from within R are “http://water.sdsc.edu/waterOneFlow/NWIS/DailyValues.asmx?WSDL” Therefor, I wrote the following code into R program:
> library(SSOAP)
>
1998 Nov 18
2
[jar@oriole.er.usgs.gov: Re: [R] loading fortran with Redhat 5.1]
I can not answer this (message only to me).
Certainly, some of you do..
Martin
-------
Date: Wed, 18 Nov 1998 13:22:47 -0500 (EST)
From: "J. Andy Royle" <jar@oriole.er.usgs.gov>
To: Martin Maechler <maechler@stat.math.ethz.ch>
Subject: Re: [R] loading fortran with Redhat 5.1
In-Reply-To: <199811181812.TAA26068@sophie.ethz.ch>
Hi Martin,
The reason I was
2017 Dec 18
2
Finding center of mass in a hydrologic time series
Eric B's response provided just the kind of quick & simple solution I was
hoping for (appears as the function com below). However, I once again
failed to take advantage of the power of R and have reverted back to using
a for loop for the next step of the processing. The example below (which
requires the library EGRET for pulling an example dataset) works, but
probably can be replaced
2017 Dec 18
0
Finding center of mass in a hydrologic time series
Hi Eric,
the following works for me.
HTH,
Eric
library(EGRET)
StartDate <- "1990-10-01"
EndDate <- "2017-09-30"
siteNumber <- "10310000"
QParameterCd <- "00060"
Daily <- readNWISDaily(siteNumber, QParameterCd, StartDate, EndDate)
# Define 'center of mass' function
com <- function(x) {
match(TRUE, cumsum(x/sum(x)) > 0.5) -
2009 Nov 03
1
help with SSOAP (can't find working examples)
First of all, let me confess that I am a newbie to R and don't know
much about the language or the environment. We have a need for
plugging in R in our production runtime and need the ability to pull
data out of our existing services. I am trying to see if I can take
advantage of SSOAP such that we can expose the data via webservices
and use SSOAP to call into them. Our runtime is mostly
2017 Dec 16
3
Finding center of mass in a hydrologic time series
The small bit of script below is an example of what I'm attempting to do -
find the day on which the 'center of mass' occurs. In case that is the
wrong term, I'd like to know the day that essentially cuts the area under
the curve in to two equal parts:
set.seed(4004)
Date <- seq(as.Date('2000-09-01'), as.Date('2000-09-30'), by='day')
hyd <-
2009 Jul 27
6
Superscripts and rounding
I am new to the world of R/programming so this may be a really easy question.
I thank you for your patience and help in advance
I would like the characters km^2 to be displayed on the plot subtitle as km
squared - two as a superscript.
I would also like to have the numbers from the data set for longitude and
latitude to be rounded to four decimal places.
Thank you.
plot (
2017 Dec 16
0
Finding center of mass in a hydrologic time series
Hi Eric,
How about
match( TRUE, cumsum(hyd/sum(hyd)) > .5 ) - 1
HTH,
Eric
On Sat, Dec 16, 2017 at 3:18 PM, Morway, Eric <emorway at usgs.gov> wrote:
> The small bit of script below is an example of what I'm attempting to do -
> find the day on which the 'center of mass' occurs. In case that is the
> wrong term, I'd like to know the day that essentially cuts
2011 Aug 12
1
sapply to bind columns, with repeat?
Hi R-help,
I am working with US COOP network station data and the files are
concatenated in single rows for all years, but I need to pull these
apart into rows for each day. To do this, I need to extract part of
each row such as station id, year, mo, and repeat this against other
variables in the row (days). My problem is that there are repeated
values for each day, and the files are fixed width
2009 Oct 08
1
acf for a univariate time series in a data frame
hi everyone!
i want to check the autocorrelation function for a univariate time series
(streamflow) in a data frame as below:
< DF <- read.table("D:/file path....")
< DF
year jan feb mar apr ...... dec
1966 0.504 0.406 0.740 0.241 0.429
1967 0.683 0.529 0.780 0.443 0.503
.
.
.
.
what i first tried is:
acf (DF, plot = TRUE)
2018 Feb 05
1
pulling recessions out of a hydrograph
Dear R community,
I'm hoping someone out there has perhaps done this and can share their code
and/or expertise with me.
I need to pull recession periods out of a hydrograph - can anyone help me
with this?
I want to create a subset from streamflow data that consists of just the
recession curves - the decreasing runoff after the passage of a peak flow.
would really appreciate any help on
2011 Jul 29
1
Limited number of principal components in PCA
Hi all,
I am attempting to run PCA on a matrix (nrow=66, ncol=84) using 'prcomp'
(stats package). My data (referred to as 'Q' in the code below) are
separate river streamflow gaging stations (columns) and peak instantaneous
discharge (rows). I am attempting to use PCA to identify regions of that
vary together.
I am entering the following command:
2006 Jan 03
1
IAX2 channels denoted as '(None)'
I have some stuck channels that I think I'm going to have to bounce
Asterisk to get rid of, but am curious to know what they are and how
they've managed to accumulate. The show up with a channel identifier of
'(None)' as in the output below, and do not show up in the soft hangup
list, and so can't be cleared by that method. Here is the output from
iax2 show channels:
2013 Jan 15
2
error in for loop in function (object not found)
Hi all, I have attached the function file (revisedfunction) and the list
of station IDs (StationIDs) in .pdf format.
I have written a function to perform various operations on the station
IDs in two groups. The first 6 station IDs require one less step than
the remaining 68 station IDs. The file referenced at the beginning of
the function is the file containing the StationIDs.
> file =
2003 Dec 20
3
NTLM V2
Samba Team,
We are trying to determine if the Samba version 2.2.8 will allow for NTLM
V2 authentication. Could you please update me on what version of Samba
allow for NTLM V2. Thank you in advance.
Sam Martinez (303 236-1834)
U.S. Geological Survey
2018 Jan 12
0
Help with packages (methods, stats, stats4)
On 12/01/2018 1:25 PM, Karim Mezhoud wrote:
> Yes,
> You are right. I mean
> install.packages('DVstats').
That won't work either, because DVstats is not on CRAN.
> Actually, it seems that DVstats does not have maintainer
> https://github.com/USGS-R/DVstats
You can try
install.packages("devtools") # if not already installed...
2018 Jan 12
2
Help with packages (methods, stats, stats4)
Yes,
You are right. I mean
install.packages('DVstats').
Actually, it seems that DVstats does not have maintainer
https://github.com/USGS-R/DVstats
Karim
On Fri, Jan 12, 2018 at 7:20 PM, Duncan Murdoch <murdoch.duncan at gmail.com>
wrote:
> On 12/01/2018 1:11 PM, Karim Mezhoud wrote:
>
>> Hi,
>> Did you try install.packages('stats').
>>
>
> That