[R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Paolo Rossi
Hello, I wonder if someone can elaborate on why in the first graph I am able to set labels vertical to the x-axis but not in the second. I tried to select the window but it didnt really help. Many Thanks Paolo ExtAvgCWV = rnorm(200) ExtAvgDemand = rnorm(200) ExtGasDays = seq(from =

Re: [R] Vertical Labels in plot graph - normally working fine but not on this graph

2011-07-08 Thread Paolo Rossi
Hi Berry, True, it works. Thanks for this and teh general advice. I have been doing things wrong from day 1 and never realised it! Cheers, Paolo On 8 July 2011 13:43, Berry Boessenkool berryboessenk...@hotmail.comwrote: Hey Paolo, you should specify las BEFORE you send the axis command.

[R] Group Data indexed by n Variables

2011-07-06 Thread Paolo Rossi
Hello, the more general thing I'd like to learn here is how to compute Function of Data on the basis of grouping determiend by n variables. In terms of the reason why I am interested in this, I need to compute the average of my data based on the value of the month and day across years. I have

Re: [R] Group Data indexed by n Variables

2011-07-06 Thread Paolo Rossi
(a) - d a } Thanks Paolo On 6 July 2011 11:06, Paolo Rossi statmailingli...@googlemail.com wrote: Hello, the more general thing I'd like to learn here is how to compute Function of Data on the basis of grouping determiend by n variables. In terms of the reason why I am

[R] Column of numbers added to dataframe when saving with read.csv

2011-06-15 Thread Paolo Rossi
I have a dataframe object having the following structure FinalOutput[1:3,] GasDays 2011-03-31 2010-09-30 2010-10-31 2010-11-30 2010-12-31 2011-01-31 2011-02-28 1 2006-10-01 217303553 221205033 222824639 217016511 216093460 216477468 216834021 2 2006-10-02 231158527 234565250

Re: [R] Column of numbers added to dataframe when saving with read.csv

2011-06-15 Thread Paolo Rossi
that that first column of row names appears in your R output as well. Sarah On Wed, Jun 15, 2011 at 10:51 AM, Paolo Rossi statmailingli...@googlemail.com wrote: I have a dataframe object having the following structure FinalOutput[1:3,] GasDays 2011-03-31 2010-09-30 2010-10-31 2010-11-30

[R] Converting Variable Name into String

2011-05-19 Thread Paolo Rossi
Hello, I would like to create lagged and delta variables from a set of variables and then add them to a dataframe Suppose that GDPPcSa is a variable. I would like to be able to do this QuarterlyData$D1GdpPcSa = diff(GDPPcSa , 1) in an automated fashion so that I loop over Quartely data to

Re: [R] Converting Variable Name into String

2011-05-19 Thread Paolo Rossi
there already does what you want. -- Bert On Thu, May 19, 2011 at 8:05 AM, Paolo Rossi statmailingli...@googlemail.com wrote: Hello, I would like to create lagged and delta variables from a set of variables and then add them to a dataframe Suppose that GDPPcSa is a variable. I would

[R] Adding Time Series to data.frame without knowing the name of teh time series

2011-04-15 Thread Paolo Rossi
Hello, quick question I reckon. Is there a way to add to time series to a dataframe without knowing their name in advance? I can figure it out the following but wondered if there is a better way Thanks Paolo a = data.frame(i = rep(100, 12)) colnames(a)[length(colnames)] = i

[R] BackCast and Forecast with stats.arima and forecast.Arima

2011-04-13 Thread Paolo Rossi
Hello everyone, I am experiencng some problems in producing forecasts and backcast from an ARIMA(1,0,0) model. I need to produce an insample backcast and a seasonal normal backcast and forecast. I have a seasonal consumption function. By using actual data I get actual demand. By passing Seasonal

[R] Estimation and Forecast of Seasonal Component

2011-02-01 Thread Paolo Rossi
Hi list, I would like to estimate and forecast the seasonal component of a series. My model which uses daily data would be something y t = alpha + beta x SeasComp t + gamma x OtherRegressors t. One approach to this would be use quarterly dummies, another to use a sine function. The first would

[R] ARIMA simulation including a constant

2011-01-03 Thread Paolo Rossi
Hi, I have been looking at arima.sim to simulate the output from an ARMA model fed with a normal and uncorrelated input series but I cannot find a way to pass an intercept / constant into the model. In other words, the model input in the function allows only for the AR and MA components but I

Re: [R] ARIMA simulation including a constant

2011-01-03 Thread Paolo Rossi
-2.635 0.00841 ** --- Intercept is significant and I suppose it should be used if I want simulate values from this ARMA(1,1) Thanks and Apologies for not being clear Paolo On 3 January 2011 16:46, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Mon, 3 Jan 2011, Paolo Rossi wrote: Hi, I

[R] Error using sos

2010-12-31 Thread Paolo Rossi
I am trying to use sos but I get the message below My PC's spec is: MS XP Version 2002 SP 3 Intel Celeron E3300 @ 2.50Ghz Is the error below related to a firewall or something? Thanks and Happy New Year Paolo Error in readLines(link) : cannot open the connection In addition: Warning

[R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Paolo Rossi
Hi Everyone, quick question before the end of the year. I have soem indices to select data from a bigger sample. I want to select n days before each index and n days after the index. Any clever way to do it. A for loop would do but I wanted to know if there is a moreR-friendly way to approach

Re: [R] Repeated Indexing / Sequence Operation

2010-12-31 Thread Paolo Rossi
in my pevious message the line with SampleWidth should be SampleWidth = 5 Paolo On 31 December 2010 18:03, Paolo Rossi statmailingli...@googlemail.comwrote: Hi Everyone, quick question before the end of the year. I have soem indices to select data from a bigger sample. I want to select n

Re: [R] Turning a Variable into String

2010-12-20 Thread Paolo Rossi
Thank you very much to the both of you Paolo On 20 December 2010 00:35, Duncan Murdoch murdoch.dun...@gmail.com wrote: On 19/12/2010 7:21 PM, Paolo Rossi wrote: I would like to know how to turn a variable into a string. I have tried as.symbol and as.name but it doesnt work for what I'd

[R] Sine Regression in R

2010-12-20 Thread Paolo Rossi
Hi everyone, I am trying to fit a sine function on one year of wind data. I have two questions below. Looking around on the net I managed to get the following: Sine Equation: y = a + b * sin( c + d*x ) b is the amplitude, c is the phase shift, d is something deal with periodicty of data*.*

[R] Turning a Variable into String

2010-12-19 Thread Paolo Rossi
I would like to know how to turn a variable into a string. I have tried as.symbol and as.name but it doesnt work for what I'd like to do Essentially, I'd like to feed the function below with two variables. This works fine in the bit working out number of elements in each variable. In the

Re: [R] Parameterising apply To Compute Rolling Average of Columns in a matrix

2010-11-27 Thread Paolo Rossi
Awesome - thanks! Paolo On 17 November 2010 19:44, Ray Brownrigg ray.brownr...@ecs.vuw.ac.nzwrote: On Thu, 18 Nov 2010, Paolo Rossi wrote: I sent a post to find a clever way to compute a Rolling Average of columns in a matrix and I was given the solution below which I am very pleased

Re: [R] Computing Rolling Average

2010-11-17 Thread Paolo Rossi
...@r-project.org] On Behalf Of Ray Brownrigg Sent: Tuesday, November 16, 2010 12:05 PM To: r-help@r-project.org Subject: Re: [R] Computing Rolling Average On Wed, 17 Nov 2010, Paolo Rossi wrote: Hi, Can anyone suggest a clever way to compute a rolling weekly average

[R] Parameterising apply To Compute Rolling Average of Columns in a matrix

2010-11-17 Thread Paolo Rossi
)) RollingAverage(a[, 1], 7)# works fine apply(a, 2, RollingAverage)# this doesnt work as it doesnt see RollingObs Is there a way to pass an additional parameter to apply? Thanks Paolo On 16 November 2010 20:05, Ray Brownrigg ray.brownr...@ecs.vuw.ac.nzwrote: On Wed, 17 Nov 2010, Paolo

[R] Computing Rolling Average

2010-11-16 Thread Paolo Rossi
Hi, Can anyone suggest a clever way to compute a rolling weekly average of the columns in a matrix? The column bit is straightforward – use apply given a function which does what you want on a column. With regard to a particular column, the obvious way is to run a for loop indexing the last 7

Re: [R] Computing Rolling Average

2010-11-16 Thread Paolo Rossi
...@comcast.net wrote: On Nov 16, 2010, at 2:33 PM, Paolo Rossi wrote: Hi, Can anyone suggest a clever way to compute a rolling weekly average of the columns in a matrix? The column bit is straightforward – use apply given a function which does what you want on a column. With regard

Re: [R] Problems loading xlsx

2010-11-15 Thread Paolo Rossi
and the odbcConnectExcel2007 function. I have had reasonable success with this. On Sun, Nov 14, 2010 at 3:23 PM, Paolo Rossi statmailingli...@googlemail.com wrote: Hi all, I am trying to run the package xlsx to read Excel 2007 files and I am getting the error below. library(xlsx) Loading required

[R] Problems loading xlsx

2010-11-14 Thread Paolo Rossi
Hi all, I am trying to run the package xlsx to read Excel 2007 files and I am getting the error below. library(xlsx) Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'xlsxjars', details: call: .jinit() error: cannot obtain

[R] Problems loading xlsx

2010-11-14 Thread Paolo Rossi
Hi all, I am trying to run the package xlsx to read Excel 2007 files and I am getting the error below. library(xlsx) Loading required package: xlsxjars Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'xlsxjars', details: call: .jinit() error: cannot obtain