Federico,
as far as I understand Kalman filter works under gaussian conditions, and for
this reason it is not implemented. (I have to admit that I do not know the
sspir package)
hope this helps, and correct me if I am wrong
Best regards
Stefano Sofia PhD
On 11/17/2010 11:49 AM, feder wrote
Dear R-list users,
this question is not strictly related to R, but hopefully somebody will be able
to answer.
In a schematic way, which is the algorithm to sample from a multivariate normal
distribution using the singular value decomposition?
thank you for your help
Stefano
AVVISO IMPORTANTE:
Dear R list users,
the singluar value decomposition of a symmetric matrix M is UDV^(T), where U =
V.
La.svd(M) gives as output three elements: the diagonal of D and the two
orthogonal matrices u and vt (which is already the transpose of v).
I noticed that the transpose of vt is not exactly u.
to understand when this option
is impostant.
Is it important to set mu=0 (only) when I deal with singular matrices?
Thank you for your attention and your help
Stefano Sofia
Dear R list users,
the singluar value decomposition of a symmetric matrix M is UDV^(T),
where U = V.
La.svd(M) gives
I am using R Version 2.3.1 (2006-06-01) in Linux with Ubuntu 7.4.
I installed a new package with
R CMD INSTALL -l /usr/lib/R/library newpackage.tar.gz
Each time I run R I need to load this new package typing library(newpackage).
My question is: how can I automatically load this new package
Dear R-users,
I have to deal with (txt) files of the form
10092007 24.62 24.31 24.90
11092007 19.20 23.17 22.10
13092007 24.71 27.33 23.10
14092007 27.33 27.90 24.10
15092007 28.22 28.55 24.30
16092007 28.53 29.24 27.40
17092007 24.19 30.64 26.80
18092007 22.60 20.62 28.40
19092007 18.89 21.70
Dear R users,
I have a txt file of the form
10092007 24.62 24.31 24.90
11092007 19.20 23.17 22.10
13092007 24.71 27.33 23.10
14092007 27.33 27.90 24.10
15092007 28.22 28.55 24.30
16092007 28.53 29.24 27.40
17092007 24.19 30.64 26.80
18092007 22.60 20.62 28.40
19092007 8.89 1.70 14.70
20092007
, this should be provided by users.
What does 'no covariate' mean, within this model?
thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo a persone autorizzate
alla ricezione. I messaggi di
1000
and store square matrices of dimension 13.
Thank you for your attention and your help
Stefano Sofia PhD
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo a persone autorizzate
alla ricezione. I messaggi di posta
table(my_df$year_birth, my_df$month_birth, my_df$day_birth)
which satisfies (partially) question numer 1 (I am not able to have 0 in the
not available days).
Is there a smart way to do that without invoking too many loops?
thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio
Dear R users,
I am trying to use the dlm package, and in particular the dlmBSample function.
For some reason that I am not able to understand, this function does not work
properly and the plot of the result does not make sense, while dlmFilter works
perfectly.
I think that my_mod is correct,
71.1 4.86e-14 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
R-sq.(adj) = 0.885 Deviance explained = 87.2%
UBRE score = 0.13791 Scale est. = 1 n = 20
Thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può
Dear R-users,
in case of linear model,
lm(Y ~ X)
is equivalent to
glm(Y ~ X, family=gaussian(link=identity))
In case of the exponential model
lm(log(Y) ~ X)
why
glm(Y ~ X, family=gaussian(link=log))
is not equivalent? Is there an equivalent glm to lm(log(Y) ~ X)?
Thank you for your help
Stefano
, in
glm(Y ~ X, family=gaussian(link=log))
the regression is
log(mu) = beta0 + beta1*X.
In
lm(log(Y) ~ X)
the regression is
exp(mu+(1/2)*sigma^2) = beta0 + beta1*X.
Correct?
Thank you for your help
Stefano Sofia
Da: peter dalgaard [pda...@gmail.com]
Inviato
for this topic in the R archive, but I have not been able to find an
example or a useful hint.
Could you please help me? Does arima handle seasonal ARMA processes? If yes,
how? Is there a better specific package for that?
Thank you for your help
Stefano Sofia
AVVISO
Warning message:
In `[-.factor`(`*tmp*`, ri, value = 1:31) :
invalid factor level, NAs generated
?
Thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo
Thanks to Rui Barradas and to Arun.
Rui's considerations are very sensible, and they solved all my doubts.
Thank you
Stefano
Da: Rui Barradas [ruipbarra...@sapo.pt]
Inviato: martedì 23 luglio 2013 14.40
A: arun
Cc: Stefano Sofia; R help
Oggetto: Re: [R
Dear R users,
I have a very long data frame (50 years, more than 1.5 million rows) of daily
rainfall data from about 80 raingouges.
The data frame that I have been given looks like
Raingouge_number Station_number Year Month Day Rainfall
2004 2230 1951 1 1 2.60
2004 2230 1951 1 2 0.40
2004 2230
-%d)
dat1$Date1txt - format(dat1$Date1, %Y%m%d)
Stefano
Da: arun [smartpink...@yahoo.com]
Inviato: martedì 4 marzo 2014 17.06
A: r-help@r-project.org
Cc: Stefano Sofia
Oggetto: Re: [R] format for as.Date and inserting missing rows in a data frame
Hi,
May
Dear list members,
I have to export (through 'write.table') a dataframe where two columns must be
respectively F10.1 (floating with 10 digits, 1 of which for the decimal
position) and i3 (integer of length 3).
I looked at the 'format' options, but I couldn't see what I need.
I also looked for
Dear list users,
I have two data frames df1 and df2, where the columns of df1 are
Sensor_RM Place_RM Station_RM Y_init_RM M_init_RM D_init_RM Y_fin_RM M_fin_RM
D_fin_RM
and the columns of df2 are
Sensor_RM Station_RM Place_RM Province_RM Region_RM Net_init_RM
GaussBoaga_EST_RM
Dear list users,
could somebody explain to me which is the meaning of
rgamma(3, a, b)
when both a and b are two vectors of length 3?
I know that a is the shape and b is the scale, but I thought that they could
only be scalars.
Thank you for your help
Stefano
Dear R-users,
I have a data frame where in each row there is the daily rainfall cumulative;
missing days mean that in that days rainfall has been zero.
I need to group all the consecutive days in a single row and store in the field
rainfall the sum of these consecutive days.
Is there a reasonable
holtman [jholt...@gmail.com]
Inviato: mercoledì 2 ottobre 2013 17.29
A: Stefano Sofia
Cc: r-help@r-project.org
Oggetto: Re: [R] Group all the consecutive days
try this:
rain - read.table(text = 'year month day rainfall landslide
+ 3 2007 6 6 1.6 0
+ 4 2007 6 7 1.8 0
+ 6 2007 6 12 4.6 0
+ 8 2007 7 5
(and frequency is always 1).
Differencing is not the best method to remove seasonal effects, but why it does
not work at all?
Could somebody give me some useful hints?
Thank you for your help
Stefano
--
Stefano Sofia PhD
Civil Protection of Marche Region
at the beginning, without possibility of changing it throughout
the code?
Secondly, is it possible to define mymat as a matrix of integers, with no
possibility of loading real numbers?
Thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni
/KALMAN_DEV2/output/MAIL.txt, sep = \t,
row.names=FALSE, col.names = TRUE, quote=FALSE, qmethod=double)
Thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo a persone autorizzate
alla
])
creates
(-999,14,5)
while I need
(NA,14,5)
Can I do it directly while I create my_array, without using an external if
statement?
Thank you for your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo
I would like to simulate some SARIMA models, e.g. a SARIMA (1,0,1)(1,0,1)[4]
process.
I installed the package 'forecast', where the function simulate.Arima should do
what I am trying to do.
I am not able to understand how it works
Could somebody help me with an example?
thank you
Stefano Sofia
the years, from the 8th to the 14th of May,
..., from the 29th to the 31st of May, from the 1st to the 7th of July and so
on).
Is there an easy way to do that?
Thank you for your help
Stefano Sofia
yearmonthday Freq
1 2004 51 3
2 2004
Thank you to Ozgur, who gave me the hints for an easy solution.
There are the commands that work for my case:
mean(my_dataframe$Freq[my_dataframe$month == 5 my_dataframe$day %in% c(1:7)])
mean(my_dataframe$Freq[my_dataframe$month == 5 my_dataframe$day %in% c(8:14)])
...
Stefano Sofia PhD
both y1 and all the Winters of y2.
I am not able to find an easy and straightforward way to do that.
Could somebody please help me in this?
Thank you
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali
Dear R users,
I have two files of seasonal rainfall data (more than 10,000 rows each); here
the first 8 rows of each file are reported.
Code_Raingouge,Y_init,M_init,D_init,h_init,m_init,Y_fin,M_fin,D_fin,h_fin,m_fin,Rainfall,N_Values,Quality_Level,Code_Station
?
Thank you
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertanto è destinato solo a persone autorizzate
alla ricezione. I messaggi di posta elettronica per i client di Regione Marche
Thank you Jim, perfect.
Da: Jim Lemon [j...@bitwrit.com.au]
Inviato: venerdì 18 luglio 2014 10.22
A: r-help@r-project.org
Cc: Stefano Sofia
Oggetto: Re: [R] Use of different colours in plot
On Fri, 18 Jul 2014 07:07:04 AM Stefano Sofia wrote:
Dear R list
Dear list users,
given for example the vector a - c(1:5), which is the easiest way to create a
list of 5 vectors with three elements each apart from the head and the tail,
like
1 2
1 2 3
2 3 4
3 4 5
4 5
? I tried to use the split command, with no success. Could somebody show me
hints for an
Thank you Jeff for your tips, I found what I was looking for.
Stefano
Da: Jeff Newmiller [jdnew...@dcn.davis.ca.us]
Inviato: lunedì 12 gennaio 2015 9.13
A: Stefano Sofia; r-help@r-project.org
Oggetto: Re: [R] list of vectors which are part of an initial
Dear r-users,
suppose that I have 20 data frames df1, df2, ..., df20 (one for each different
location) with the same column names and column types (the first column
contains a date, the others are numeric) like
day tmax tmin
2015-05-10 20 10
2015-05-11 21 12
2015-05-12 17 9
2015-05-13 24 13
Thank you David.
It is exactly what I was looking for and it works pefectly.
Stefano
Da: David L Carlson [dcarl...@tamu.edu]
Inviato: giovedì 14 maggio 2015 17.18
A: Stefano Sofia; r-help@r-project.org
Oggetto: RE: create a vector from several data frames
Thank you for your help.
Your explanations have been very useful.
Stefano
Da: Rui Barradas [ruipbarra...@sapo.pt]
Inviato: venerdì 22 maggio 2015 20.26
A: Stefano Sofia; r-help@r-project.org
Oggetto: Re: [R] apply a function to a list of data frames
Dear R-users,
given a list of dataframes (like below reported), for each month I need to
apply a function (called calc).
The result should be written in a new list of data frames, one row for each
month.
I have been trying to use sapply, with no success.
Could somebody help me in this?
$df1
Dear r-list users,
I am using windRose within the openair package.
Automatically the wind rose is saved in a pdf file called Rplots.pdf .
I need to apply this function to different data frames, and each time I need to
change automatically the name of the pdf output.
I am not able to do it, I
Thanks to Jim and to Petr for their suggestion.
Stefano
Da: PIKAL Petr [petr.pi...@precheza.cz]
Inviato: giovedì 5 novembre 2015 15.02
A: Stefano Sofia
Cc: r-help@r-project.org
Oggetto: RE: [R] How to change name of pdf output of function windRose
through
output2_df <- output1_df$data
output2_df$wd[output2_df$freqs == max(output2_df$freqs)])
Thank you for your attention and your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confidenziali, pertan
Dear John and dear Peter,
I needed time to understand better some practical implications derived from
your hints.
Thank you
Stefano
Da: Fox, John [j...@mcmaster.ca]
Inviato: giovedì 10 dicembre 2015 17.24
A: peter dalgaard; Stefano Sofia
Cc: r-help@r
Dear list users,
through the "matrixcalc" package I am performing some checks of variance
matrices (which must be positive definite).
In this example, it happens that the matrix A here reported is singular but
positive definite. Is it possible?
[,1] [,2] [,3]
, John [j...@mcmaster.ca]
Inviato: giovedì 10 dicembre 2015 14.41
A: Stefano Sofia; r-help@r-project.org
Oggetto: RE: matrix which results singular but at the same time positive
definite
Dear Stefano,
You've already had a couple of informative responses directly addressing your
question
Dear list users,
I want to use apply a MA(2) process (x=beta1*epsilon_(t-1) +
beta2*epsilon_(t-1) + epsilon_(t)) to a given time series (x), and I want to
estimate the two parameters beta1, beta2 and the variance of the random
variable epsilon_(t).
If I use
MA2_1 <- Arima(x, order=c(0,0,2))
I
Da: Paul Gilbert [pgilbert...@gmail.com]
Inviato: martedì 15 dicembre 2015 15.28
A: Stefano Sofia
Cc: r-help@r-project.org; Fox, John; peter dalgaard
Oggetto: Re: [R] matrix which results singular but at the same time positive
definite
Stefano
I think in other response to in this thread you got
ways in this direction, with no success.
Is there an efficient way to do that?
Could somebody give me an hint about it?
Thank you for your attention and your help
Stefano Sofia
AVVISO IMPORTANTE: Questo messaggio di posta elettronica può contenere
informazioni confid
Dear R list users,
sorry for this simple question, but I already spent many efforts to solve it.
I create an empty data frame called df_year like
df_year <- data.frame(day=as.Date(character()), hs_MteBove=integer(),
hs_MtePrata=integer(), hs_Pintura=integer(), hs_Pizzo=integer(),
Thank you Jim,
you gave me the right hint.
Stefano
Da: Jim Lemon [drjimle...@gmail.com]
Inviato: martedì 7 giugno 2016 9.39
A: Stefano Sofia
Cc: r-help@r-project.org
Oggetto: Re: [R] evaluate the daily mean with date in "POSIXct" "POSIXt&quo
ot work. I do not understand why the class of df_snow_day$snow is of
type list either:
day snow
NA NULL
NA.1 NULL
NA.2 NULL
Where is my mistake?
Thank you for all your help
Stefano
_
Da: Duncan Murdoch [murdoch.dun...@gmail
Dear list users,
I would like to have multiple plots in one page with ggplot, in particular five
graphs:
in the central plot the snow cover (hs) of two meteorological stations; above
wind direction and temperature of one of the two stations and below wind
direction and temperature of the other
Dear R list users,
I have three lists of data frames, respectively temp_list, wind_list and
snow_list.
The elements of these three lists are
temp_list$station1, temp_list$station2 and temp_list$station3 with columns date
and temp;
wind_list$station1, wind_list$station2 and wind_list$station3
Dear R list users,
I am not able to perform a trivial filter of a data frame.
From a txt file (df_file.txt) of this form:
sensor_RM station_RM place_RM municipality_RM Y_init_RM M_init_RM D_init_RM
Y_fin_RM M_fin_RM D_fin_RM goes_on notes sensor_RT station_RT net Omogneneous
2000 1510 Candelara
Thank you
Stefano
Da: Huzefa Khalil [huzefa.kha...@umich.edu]
Inviato: luned� 15 febbraio 2016 17.52
A: Stefano Sofia
Cc: r-help@r-project.org
Oggetto: Re: [R] filtering a data frame from a column of type integer
This is because of the presence of NA's in your
for example
"20071119" and "20071121".
I am not able to create a sequence of class "POSIXlt" "POSIXt", in order to
merge the two data frames.
Could you please help me in this?
Thank you again for your attention
Stefano
_______
Dear R-list users,
I need to use strptime because I have to deal with date with hours and minutes.
I read the manual for strptime and I also looked at many examples, but when I
try to apply it to my code, I always encounter some problems.
I try to change the default format, with no success. Why?
missing data, rather than making
# assumptions.
Again, sorry for my question
Stefano
Da: Sarah Goslee [sarah.gos...@gmail.com]
Inviato: mercoledì 7 settembre 2016 15.11
A: Stefano Sofia
Cc: r-help@r-project.org
Oggetto: Re: [R] how to manage missing values c
nt_RT
[1] "numeric"
$Lat_cent_RT
[1] "numeric"
$Quota_RT
[1] "numeric"
$Actual_net
[1] "character"
$Notes
[1] "logical"
$Test_20141231
[1] "character"
$Test_20151231
[1] "character"
I am struggling to understand why the query throu
ives
> [1] "YES"
>
> while
> print(Storia_RM_RT$Omogenea_20151231[Storia_RM_RT$Station_RT == 112]) gives
> [1] NA "YES"
>
>
> I am struggling to understand why the query through the field Station_RT does
> not work.
> Could please somebody
ugh for me)
- ggplot should produce the map I need; but where are the options for the
interpolation method?
Again, any help will be appreciated.
Stefano
(oo)
--oOO--( )--OOo--------
Stefano Sofia PhD
Area Meteorologica e Area Nivologica - Centro Funzionale
Servizio Protezione Civile
= element_blank(),
legend.position = �right�,
legend.key = element_blank()
)
(oo)
--oOO--( )--OOo--------
Stefano Sofia PhD
Area Meteorologica e Area nivologica - Centro Funzionale
Servizio Protezione Civile - Regione Marche
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071
ection for an efficient solution?
Thank you for your attention and your help
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Area Meteorologica e Area nivologica - Centro Funzionale
Servizio Protezione Civile - Regione Marche
Via del Colle Ameno 5
60126 Torrette d
]])
df_snow_totals <- data.frame("station_code" = c(217, 218, 219))
df_snow_totals$Cumulata <- as.vector(my_output)
df_snow_totals$Cumulata <-
as.numeric(as.character(unlist(df_snow_totals$Cumulata)))
It works.
Thank you for your help
Stefano
(oo)
--oOO--
Thank you.
Perfect solution.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Area Meteorologica e Area nivologica - Centro Funzionale
Servizio Protezione Civile - Regione Marche
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so
you for your help
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Area Meteorologica e Area nivologica - Centro Funzionale
Servizio Protezione Civile - Regione Marche
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.
Hello.
I am not sure if this hint might be useful, but I share it anyway: what about
using the as.POSIXct command?
as.POSIXct(mydate, format="%d-%m-%Y) or as.POSIXct(mydate, format="%d/%m/%Y)
Hope this helps
Stefano
(oo)
--oOO--( )--OOo--------
Stefano Sofia
Thank you very much.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO
efficient at
all.
Could please somebody help me to find an easy way to implement it?
Thank you for your attention and your help
Stefano Sofia
(oo)
--oOO--( )--OOo--------
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 T
is costantly and strictly from the chosen direction.
Does anybody have a clue on how to start to build this process in the right way?
Thank you for your attention and your help
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow
be taken into consideration only if within it the mean of max_speed is
higher than 8.0 (which is speed in m/s).
Could you please help me in this final step?
Thank you again for all your help
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
80, 5.60, 6.50, 6.60, 11.70, 11.30,
8.70, 7.10, 6.90, 4.30, 3.80, 4.30, 3.30, 2.30, 2.30, 3.20, 3.20, 2.90, 2.30,
1.50, 1.80, 2.90, 2.40, 1.80, 2.40, 2.30, 2.60, 1.80, 2.30, 1.90, 2.20, 2.80,
2.40, 1.00, 1.10, 1.60, 2.30, 2.50, 3.30, 3.40, 3.20, 4.50)
Thank you for your attention
Stefano
s"), trunc(as.POSIXct(last_day, format="%Y-%m-%d-%H-%M"), "days"), by="12
hours"), format="h%H-%d-%m-%y", pos=0)
axis(side=2, at=seq(0, 15, 5))
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Thank you very much.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO
Thank you both of you. I am studying these solutions.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so
Yes, perfect.
Thank you.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO
a.frame(data_POSIX=seq(first_day_2, last_day_2, by="1 days"))
df2$value <- runif(nrow(df2), 0, 10)
df <- rbind(df1, df2)
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Vi
Thank you again.
I finally used aggregate because it build a data frame straight away.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E
ult
(0,0,0,1,1,1,1,0,0,0,0,2,2,0,3,3,3,0,0)
I tried with ave, but no way to get it for me.
Thank you for your help
Stefano
(oo)
--oOO--( )--OOo----
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-m
Thank you!
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO
Yes, thank you so much.
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche.it
---Oo-oO
10:30:00
23 2005-11-14 11:00:00
24 2005-11-14 11:30:00end
25 2005-11-14 12:00:00
Why there is instead of NA?
And why
df3$pch[df3$event == "start"] <- 24
gives a whole column of NA and not 24 at row 6?
(oo)
--oOO--( )--OOo
Stefano Sofia Ph
, tz="Etc/GMT-1")
df1 <- data.frame(data_POSIX=seq(day_1, day_2, by="30 min"))
df1$hs <- rnorm(nrows(df1), 40, 10)
df1$diff[2:nrow(df1)] <- diff(df1$hs)
df1$day <- format(df$data_POSIX,"%y-%m-%d")
df2 <- aggregate(diff ~ day, df, sum)
Thank you for your he
u for your attention and your help
Stefano
(oo)
--oOO--( )--OOo----
Stefano Sofia PhD
Civil Protection - Marche Region
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona
Uff: 071 806 7743
E-mail: stefano.so...@regione.marche
.
Also missing data might be easily handled, changing the "mean" function with a
function that accepts NA.
But I will study all the solutions that have been kindly proposed.
Thank you all of you
Stefano
(oo)
--oOO--( )--OOo--------
Stefano Sofia PhD
Civil Protectio
Thank you Jim for your solution.
I understood everything. As you say, splitting the POSIXct field is the key.
I apologise for not having used dput. I never used it but I will get aknowleged
with it in a short time.
Thank you
Stefano
(oo)
--oOO--( )--OOo
Stefano Sofia
-02-01 00:30:00
4 2018-02-01 00:30:00 39 2018-02-01 00:30:00
5 2018-02-01 00:40:00 34 2018-02-01 00:00:00
6 2018-02-01 00:50:00 32 2018-02-01 00:00:00
...
Is there a way to modify this code to groupp data correctly? (I would prefer
using only the base package)
Thank y
of length 2. I thought that, once created an empty data
frame, I could fit any vector without specifying the length since the beginning.
Now I will think about it.
Thank you
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region
please give me the right hints?
Thank you for your precious help
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torre
er not to use additional
packages.
Thank you for your precious help
Stefano
(oo)
--oOO--( )--OOo----------
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff:
--oOO--( )--OOo----------
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so...@regione.marche.it
Thank you Bill, your tip solved everything.
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail
Maximum at the right endpoint is well accpted in both cases. If I am correst, I
just append -Inf at the right end and then I apply what you wrote.
Thank you.
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo
o
(oo)
--oOO--( )--OOo----------
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so...@r
this is a single day;
- f I choose a threshold of 100 cm in four days, I should get the 12th of
February.
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona
Thank you Petr,
simply perfect.
Thank you again
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E
hank you for
your support.
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
Thanks to all of you.
Stefano
(oo)
--oOO--( )--OOo--
Stefano Sofia PhD
Civil Protection - Marche Region - Italy
Meteo Section
Snow Section
Via del Colle Ameno 5
60126 Torrette di Ancona, Ancona (AN)
Uff: +39 071 806 7743
E-mail: stefano.so
1 - 100 of 110 matches
Mail list logo