[R] R: Group all the consecutive days

2013-10-07 Thread Stefano Sofia
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&qu

[R] Different information between correlation and frequency of a seasonal time series

2013-10-27 Thread Stefano Sofia
(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

[R] plot a single frequency of a ts object

2013-11-06 Thread Stefano Sofia
graph 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 confide

Re: [R] Kalman filter

2010-11-20 Thread Stefano Sofia
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

[R] Query: matrix definition

2011-02-21 Thread Stefano Sofia
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 inform

[R] Regression equation with a spline in gam (mgcv)

2012-06-19 Thread Stefano Sofia
.967 4.85 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 e

[R] two simple questions about MCMCpoissonChange

2011-09-30 Thread Stefano Sofia
iate, 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 rice

[R] query about counting rows of a dataframe

2011-11-03 Thread Stefano Sofia
of "labour" I tried with the command 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 S

[R] how to divide data by week

2012-04-13 Thread Stefano Sofia
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

[R] problems with dlmBSample of the dlm package

2012-01-23 Thread Stefano Sofia
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, beca

[R] Query: list within a list

2012-02-22 Thread Stefano Sofia
the lists within A of length 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 ri

[R] Summary about how to divide data by week

2012-04-17 Thread Stefano Sofia
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 S

[R] Query: how to group data by months from a text file

2008-04-19 Thread Stefano Sofia
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 14.

[R] Query: how to add quotes when importing a txt file

2008-05-09 Thread Stefano Sofia
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 2

[R] Question: about loading a new package

2008-02-14 Thread Stefano Sofia
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 once

<    1   2