similar to: Finding center of mass in a hydrologic time series

Displaying 20 results from an estimated 300 matches similar to: "Finding center of mass in a hydrologic time series"

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 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
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) -
2017 Jun 07
4
Determining which.max() within groups
Using the dataset below, I got close to what I'm after, but not quite all the way there. Any suggestions appreciated: Daily <- read.table(textConnection(" Date wyr Q 1911-04-01 1990 4.530695 1911-04-02 1990 4.700596 1911-04-03 1990 4.898814 1911-04-04 1990 5.097032 1911-04-05 1991 5.295250 1911-04-06 1991 6.569508 1911-04-07 1991 5.861587 1911-04-08 1991 5.153666
2010 Aug 27
3
R-help
Respected R Help Team Members, I am venkatesh .B , doing mtech in *University of Hyd,HYDERABAD. *i want know , is there any package that contains Hungarian algorithm, that solves linear assignment problem. thanking you. * * -- *Sincerely B.venkatesh University of Hyd,HYDERABAD 9440186746* [[alternative HTML version deleted]]
2017 Jun 07
0
Determining which.max() within groups
cumsum() seems to be what you need. This can probably be done more elegantly, but ... out <- aggregate(Q ~ wyr, data = Daily, which.max) tbl <- table(Daily$wyr) out$Q <- out$Q + cumsum(c(0,tbl[-length(tbl)])) out ## yields wyr Q 1 1990 4 2 1991 6 3 1992 9 4 1993 15 5 1994 18 I leave the matter of Julian dates to you or others. Cheers, Bert Bert Gunter "The trouble
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
2014 Apr 25
1
Perf enhancements in Samba4.1 related to SMB2.1 / SMB3.0 protocol
Hi Everyone, My doubts are for Samba4.1 performance related enhancements (SMB2.1 / SMB3.0). My experimental samba server hardware is running 4.1 version. Want to improve robocopy WRITE throughput from a two samba client machines (win7 or win8 or server2012 x86 servers). Someone please advice me how can I use SMB2.1 or SMB3.0 capabilities to improve WRITE throughput. I tried samba4.1
2003 Nov 10
1
kmeans error (bug?)
Hello, I have been getting the following intermittent error from kmeans: >str(cavint.p.r) num [1:1967, 1:13] 0.691 0.123 0.388 0.268 0.485 ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:1967] "6" "49" "87" "102" ... ..$ : chr [1:13] "HYD" "NEG" "POS" "OXY" ... > set.seed(34) >
2003 Sep 19
0
RE: samba Digest, Vol 9, Issue 21
Hi all, Is there any problem in authentication to samba in Windows 2003 AD.? I am intermittently getting authentication failures in smbd.log. ~~~ 2003/09/18 14:28:02, 1] smbd/password.c:server_validate(1176) password server HYDGCS01.HYD.CORP.INT.UNTD.COM rejected the password [2003/09/18 14:28:02, 0] passdb/pdb_smbpasswd.c:pdb_getsampwnam(1369) unable to open passdb database. [2003/09/18
2017 Dec 13
3
inefficient for loop, is there a better way?
The code below is a small reproducible example of a much larger problem. While the script below works, it is really slow on the true dataset with many more rows and columns. I'm hoping to get the same result to examp, but with significant time savings. The example below is setting up a data.frame for an ensuing regression analysis. The purpose of the script below is to appends columns to
2012 Nov 02
2
override date in xts time series
Using the following bit of R, I'm wondering if there is a way to override/manipulate/replace the date in one xts time series with the date of another xts time series while not affecting/changing the times of the xts time series? library(xts) x.Date <- rep("1/1/2004",times=5) x.Times<- c("00:00:00", "00:15:00", "00:30:00",
2009 Sep 07
1
spplot modifications
http://www.nabble.com/file/p25336596/Conductivity1.jpeg I need a little help making modifications to the image included with this post. First, rather than using a linear color legend to display the output I would like to use a log-scale legend. Thus, the legend on the right would go from 1 to 1000, for example, with a classic log-scale gradation. What I hope to avoid is taking the log of the
2017 Sep 13
2
compounding precipitation based on whether falls within a day
Using the small reproducible example below, I'm wondering how best to complete the following task: In the small reproducible example below, the 3D array prec has indexes that correspond to time, x, y (i.e., prec[time, x, y]). In this case, the time index is hours since some predefined start time. I'd like to add up all the time indexes in 'prec' based on whether or not the
2013 Apr 06
1
Update ogg.m4
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Please update m4/ogg.m4 Namely, new version should support --with-ogg=yes or --with-ogg=no (this enables ogg stuff, but does not add -L to OGG_LIBS, that is crucial to keep .pc files clean). ogg.m4 from libogg-1.3.0 will be sufficient. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird -
2017 Dec 20
1
outlining (highlighting) pixels in ggplot2
I apprecaite the guidance Eik, that works great! I'm also wondering if you have any pointers for how I might stretch the color scale so that the max and min values are the same? Right now, the min is -0.064 and the max is something closer to 0.04. As you can see in what I sent, I tried adding: zmax1 = max(abs(m1)) ggplot(..., autoscale = FALSE, zmin = -1 * zmax1, zmax = zmax1) + ... to
2016 Aug 20
2
LLVM flags for Vectorization
Hi, I have been analyzing the LLVM vectorizer by running some benchmarks. For vectorization, I have used the following flags: -O3 -ffast-math -mavx2 Am I missing any other flags which will improve vectorizer performance? Thanks, Santanu Das IIT Hyd -------------- next part -------------- An HTML attachment was scrubbed... URL:
2017 Sep 13
0
compounding precipitation based on whether falls within a day
Thanks for the reprex. Wouldn't have bothered without it. The following is I believe **almost** what you want. It seems a bit clumsy to me, so others may provide you something neater. But anyway... ## Convert POSIXct vector to dates ## There are 22 different days, not 21 date <- as.Date(prec_idx) ## Sum results by date at each i,j of the last 2 array dimensions z <-
2017 Dec 20
2
outlining (highlighting) pixels in ggplot2
Using the small reproducible example below, I'd like to know if one can somehow use the matrix "sig" (defined below) to add a black outline (with lwd=2) to all pixels with a corresponding value of 1 in the matrix 'sig'? So for example, in the ggplot2 plot below, the pixel located at [1,3] would be outlined by a black square since the value at sig[1,3] == 1. This is my first
2011 Mar 23
2
mean of runoff for several years
Hello everyone I have a dataframe with 4 colums (year, month, day, runoff) for 1993-2009. Now I like to calculate the average runoff for each day. Finally I like to plot the median runoff for all this years. I tried with some loops, but it didn't work. Do you have any Tips for my problem? Any help is greatly appreciated! Thank you very much. Dominique -- View this message in context: