Displaying 20 results from an estimated 10000 matches similar to: "Sum per hour"
2007 May 08
3
plot time series
[This email is either empty or too large to be displayed at this time]
2007 Jun 06
1
spgrass6 and aggregation (bis)
Dear all,
I have some additionale question concerning the spgrass6 package.
* When you set a region in GRASS, does the readGRASS6 function in R only
load data contained in the zoomed region or the whole map ?
* When you have a MASK map in grass, does the readGRASS6 function in R only
load data contained inside the MASK area ?
Could this be the problem ?
Thanks,
Jessica
2007 May 18
2
time series
Dear all,
I am working with a data file which is the record of precipitation
measurement normaly done every 10 minutes. I would like to check if there
are missing times in my data file.
Is there a function existing able to check for that in R ?
Thanks by advance,
Jessica
2008 Feb 12
3
regular expression for na.strings / read.table
Dear all,
I am working with a csv file.
Some data of the file are not valid and they are marked with a star '*'.
For example : *789.
I have attached with this email a example file (test.txt) that looks like
the data I have to work with.
I see 2 possibilities ..thast I cannot manage anyway in R:
1-first & easiest solution:
Read the data with read.csv in R, and define as na strings
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
2006 Sep 27
1
exponential fitting
Hi,
I would like to fit some experimental points by a exponential function.
I ignore the parameters of this exponential and what I would like is to
ask R to calculate the best fitting curve an the associated parameters (as
the linear model function (lm) does for linear models).
Is it possible ?
Do anyone have an idea about how to do that ?
Thanks by advance
Jessica Gervais
[[alternative
2006 Sep 27
1
panel.curve
Hi,
I am trying to fit experimental points by exponemtial curve
my data are stored into a matrix data
the first column is the geographical point (a number = data[,1] ) ( I
would like to plot several graphes at the same time)
the second column is the time of measurement (x in the plot)
the third column is a speed (y in the plot)
if we assume the point are folowing this exponential behaviour
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
2006 Oct 19
1
extract arguments from a list
Hi,
I would like to know how to extract the arguments from a list :
For example, I have a list of charchacter x
x<-
c("Bentazone","Atrazine","Epoxiconazol","Metolachlor","Epoxiconazol","Atrazine
desethyl","Fenpropimorph","Epoxiconazol","Metolachlor","Simazine","Atrazine
2006 Oct 04
1
strip function
Hi,
I would like to asign titles into strip of a panel of curves designed
thanks to a xyplot function (lattice package)
I ve tried the "strip" function, ...
here is my code
I would like to write in the strip of each panel conditionning varialbe
(here, it is data[,1])
xyplot (data[,3] ~ data[,2] | data[,1] , strip.default (which.given=1,
which.panel = c(1:15), var.name= c
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have
reduced the data to two stations- one that has precipitation and one
that does not. This is going to be in the context of a larger data
set. I would like to be able to issue a ggplot command and have cum
sum just act on the facets (factors) to apply this.
library(chron)
library(ggplot2)
DF <- structure(list(date_time =
2011 May 09
2
Round down to earliest hour or half hour
I have times and would like to round down to the earliest 30 minute
increment. For instance, a time of
2011-04-28 09:02:00
(the as.numeric value = 1303999320)
I would like it to be rounded down to:
2011-04-28 09:00:00
(the as.numeric value = 1303999200)
Any ideas of how to do this?
-----
In theory, practice and theory are the same. In practice, they are not - Albert Einstein
--
View this
2012 Jun 15
2
time zones and the chron to POSIXct conversion
Hey R folks,
i found some strange (to me) behaviour with chron to POSIXct conversion.
The two lines of code result in two different results, on ewith the
correct time zone, one without:
library(chron)
as.POSIXct(chron('12/12/2000'), tz = 'UTC')
as.POSIXlt(chron('12/12/2000'), tz = 'UTC')
Only the code below would give me a POSIXct object with the correct time
2011 Feb 17
3
summing 15 minute precip data to daily
Hi all,
i'm sure there is an easy way to do this, but i'm stumped, so any help would
be appreciated.
i have a single column of data for precipitation every 15 minutes over a
year. i want to sum the precip to daily data.
so the first 96 records = the first day, the second 96 records = the second
day, and so on....
is there a way to write a for loop that would sum the data to daily, and
2003 Nov 12
3
Chron, as.POSIXct problem
Dear R list,
I noticed the following 'problem' when changing the format of dates
created with seq.dates() (from the Chron library) using as.POSIXct()
(R 1.8.0 on OSX 10.2.8):
> datesTest<-seq.dates(from="10/01/1952", length=3, by="days");
> datesTest
[1] 10/01/52 10/02/52 10/03/52
# Now changing the format to show year as 1952.
>
2004 Aug 17
3
Fwd: strptime() problem?
Hi all;
I've already send a similar e-mail to the list and Prof. Brian Ripley
answered me but my doubts remain unresolved. Thanks for the clarification,
but perhaps I wasn't clear enough in posting my questions.
I've got a postgres database which I read into R. The first column is
Timestamp with timezone, and my data are already in UTC format. An 'printed'
extract of R
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
2004 Aug 18
1
Fwd: strptime() problem? - Resolved
Hi Gabor and everybody;
Thanks Gabor, with the alternative step you've told me the problem is
resolved. Comparing the two procedures:
Extract from the source 'character' data:
> rain$ts[2039:2046]
[1] "25/03/2000 22:00:00 UTC" "25/03/2000 23:00:00 UTC"
[3] "26/03/2000 00:00:00 UTC" "26/03/2000 01:00:00 UTC"
[5] "26/03/2000 02:00:00
2013 Feb 23
1
Extract, sum and Loop in R
Hi all,
I have gone through some basics of R in eclipse environment. What I need to
work is more than basic level so I could not find out the solution by
myself. could anyone help me ?
My case,
I have climate data (precipitation) in nc format with single layer for each
time interval in a day. That means for January 1, 2013, I have 8 separate
files each containing 3 hrs cumulative precipitation
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 <-