[R] Histograms: Lines and boxes

2009-01-14 Thread Kerpel, John
Hi folks! I'm trying to get a histogram legend to give me a filled box and a line. The problem is I keep getting both filled boxes and a line. How can I get rid of the second box from the code below? x<-rnorm(1000,mean=0,sd=1) hist(x, breaks = 50, main="Histogram of x",freq=FALSE, xla

Re: [R] Memory allocation problem

2008-08-12 Thread Kerpel, John
See ?gc - it may help. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jamie Ledingham Sent: Tuesday, August 12, 2008 9:16 AM To: r-help@r-project.org Subject: [R] Memory allocation problem Dear R users, I am running a large loop over about 400 files. To

Re: [R] Reading data in R-metrics: FOLLOW UP

2008-08-01 Thread Kerpel, John
gt; tail(DTB3) TS.1 2008-07-23 1.56 2008-07-24 1.62 2008-07-25 1.71 2008-07-28 1.70 2008-07-29 1.69 2008-07-30 1.67 John -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kerpel, John Sent: Friday, August 01, 2008 1:13 PM To: r-help@r-project

[R] Reading data in R-metrics

2008-08-01 Thread Kerpel, John
Hi Folks! I used the code below previously with no problems, but now I get: DTB3<-read.table("C:\\Program Files\\R\\R-2.7.1\\DTB3.csv",header=TRUE,sep=",") > tail(DTB3) DATE VALUE 14233 2008-07-23 1.56 14234 2008-07-24 1.62 14235 2008-07-25 1.71 14236 2008-07-28 1.70

Re: [R] Multiple time series plots

2008-07-02 Thread Kerpel, John
:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2008 11:57 AM To: Kerpel, John Cc: r-help@r-project.org Subject: Re: [R] Multiple time series plots have you tried package(zoo) it works very well and should do what you want On Wed, Jul 2, 2008 at 10:54 AM, Kerpel, John <[EMAIL PROTECTED]>

[R] Multiple time series plots

2008-07-02 Thread Kerpel, John
Hi all: I'm trying to plot two time series created in Rmetrics and label the x-axis with dates. I tried the following: dates <- as.Date(seriesPositions(x.agg)) r <- as.Date(range(dates)) ts.plot([EMAIL PROTECTED],c(1,5)],gpars=list(ylab="Volume", lty=c(1:2),xaxt="n",main="Plot of V

[R] Extract lags from a formula

2008-05-02 Thread Kerpel, John
Hi folks! How do I extract lags from a formula? An example: mod.eq<-formula(x~lag(x,-1)+lag(x,-2)) > mod.eq x ~ lag(x, -1) + lag(x, -2) > mod.eq[1] "~"() > mod.eq[2] x() > mod.eq[3] lag(x, -1) + lag(x, -2)() I'm trying to extract the lags into a vector that would be simply [1,2

Re: [R] Error using Rmetrics to read data

2008-01-24 Thread Kerpel, John
llazuanna [mailto:[EMAIL PROTECTED] Sent: Thursday, January 24, 2008 2:02 PM To: Kerpel, John Cc: r-help@r-project.org Subject: Re: [R] Error using Rmetrics to read data SP500$Date <- as.character(as.Date(as.character(SP500$Date), "%m/%d/%y")) SP500<-as.timeSeries(SP500) On 24/01/

[R] Error using Rmetrics to read data

2008-01-24 Thread Kerpel, John
Hi folks. This set of code used to work, but after upgrading to the latest version of Rmetrics it no longer does. Any ideas? SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) DateOpenHigh Low Close Volume Close2 1 8/4/2006 1280.26 1292.92 1273.82 1

[R] Problem reading data in Rmetrics

2007-11-09 Thread Kerpel, John
Hi folks - After upgrading to the latest version of Rmetrics, I can't read in data like I used to. Is anyone seeing the following? It seems to truncate the dates after I use "as.timeSeries". -John SP500<-read.table("SP500.csv",header=TRUE,sep=",") > head(SP500) DateOpenHig

Re: [R] problem with package fSeries

2007-10-31 Thread Kerpel, John
Are you using the latest version of R - with the patch? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Balazs Torma Sent: Wednesday, October 31, 2007 11:44 AM To: r-help@r-project.org Cc: [EMAIL PROTECTED] Subject: [R] problem with package fSeries Helo,