Hello,
Please click to keep this threaded.
What I was trying to say is to do something along the lines of
Y <- lubridate::year(dati$DATAORA)
Y2013 <- Y[Y == 2013]
PY2013 <- ave(dati$PREC, Y2013, FUN = cumsum)
plot(dati$DATAORA, PY2013)
Hope this helps,
Rui Barradas
Às 08:57 de 28/01/2019,
Hello,
With on«bjects of class "Date" or "POSIXt", POSIXct" you can do
lubridate::year(date_obj)
to extract the year. Then aggregate by it.
Hope this helps,
Rui Barradas
Às 08:25 de 28/01/2019, Diego Avesani escreveu:
Dear Jeff, Dear Rui, Dear all,
Forget about the monthly things. I was tr
Dear Jeff, Dear Rui, Dear all,
Forget about the monthly things. I was trying to do two things at the same
time.
I try to explain myself. Thanks for your time and I really appreciate your
help.
I have a long file with hourly precipitation from 2000 to 2018. I would
like to select only on e year o
I have no idea what you mean when you say "select starting date and ending
date properly form [sic] datai$DATA". For one thing there is no column
called DATA, and for another I don't know what starting dates and ending
dates you might be interested in. If you need help to subset by time,
perhap
Dear Jeff, Dear Rui, Dear all,
I will try Rui's solution as soon as possible.
If I could ask:
As a first step, I would like to follow Jeff's suggestion. I will represent
the precipitation data with a cumulative distribution, one for each year.
This follow that I would like to select the starting
Very succinct, Rui!
One warning to Diego automatic data recorders tend to use the local
standard timezone year-round. R by default assumes that timestamps converted
from character to POSIXct using the current timezone on your computer... which
may not be in the same zone that the logger was
Hello,
See if the following can get you started.
It uses package CRAN zoo, function as.yearmon.
dati$MES <- zoo::as.yearmon(dati$DATAORA)
PMES <- ave(dati$PREC, dati$MES, FUN = cumsum)
plot(dati$DATAORA, PMES)
Hope this helps,
Rui Barradas
Às 15:25 de 27/01/2019, Diego Avesani escreveu:
De
Are you looking for a plot where each point represents a month? Or a plot
where each point represents the accumulated precipitation so far that month?
The latter seems closer to your computations so far, but doesn't seem like a
typical way to present precipitation data...
On January 27, 2019 7
Dear all,
I have a set of data with has hourly value:
# ID
# Lo
# L
# Q
Time,T, RH,PSFC,DIR,VEL10, PREC, RAD, CC,FOG
-mm-dd hh:mm, °C, %, hPa, °N, m/s, mm/h,W/m², %,-
2012-01-01 06:00, -0.1,100, 815,313, 2.6, 0.0, 0, 0,0
2012-01-01 07:00, -1.2, 93, 814,314, 4.8, 0.0, 0, 0,0
9 matches
Mail list logo