[R-SIG-Finance] chartSerieries (quantmod) : data range

Robert Iquiapaza rbali at ufmg.br
Wed Aug 6 19:30:43 CEST 2014


Hannu,

your data is a little bit different from yahoo, as you have only one series 
this should work

sdf <- read.table("sdf.txt", header=T,as.is=T)
str(sdf)
SDF2 = timeSeries(round(sdf[,2],3), sdf[,1])
chartSeries(SDF2,theme=chartTheme('white'),TA=NULL)


> str(sdf)
'data.frame':    235 obs. of  3 variables:
$ time: chr  "6/30/1994" "7/29/1994" "8/31/1994" "9/30/1994" ...
$ m   : num  1.006 0.948 0.944 1.005 0.982 ...
$ fit : num  0.995 0.996 0.988 0.985 0.992 ...

-----Mensagem Original----- 
From: Robert Iquiapaza
Sent: Wednesday, August 06, 2014 10:00 AM
To: Hannu Kahra
Cc: r-sig-finance at r-project.org
Subject: Re: [R-SIG-Finance] chartSerieries (quantmod) : data range

This works :

Ibov=getSymbols('^BVSP', src='yahoo',from='2000-01-01',auto.assign=FALSE)
IBOV <- to.monthly(Ibov,indexAt='lastof')["2000-08-31/2014-07-31"]
chartSeries(IBOV,theme=chartTheme('white'),TA=NULL)
names = index(IBOV)
IBOV = timeSeries(IBOV, names)
chartSeries(IBOV,theme=chartTheme('white'),TA=NULL)

Robert


2014-08-06 4:56 GMT-03:00 Hannu Kahra <hkahra at gmail.com>:

> Hi,
>
> I apply the chartSeries (quantmod) function to plot a time series. The
> function provides the data range on top of the graph:
>
> [1994-06-01 03:00:00/2013-12-01 02:00:00].
>
> The data are monthly from 1994-06-01 through 2013-12-01.
>
> Is it possible to get rid of the range in the graph, or have it
> [1994-06-01/2013-12-01]?
>
> -Hannu
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-SIG-Finance at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions
> should go.
>
>

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions 
should go.



More information about the R-SIG-Finance mailing list