Michael:

Thanks a lot. It worked.
We have to extract the core part of the time-series data.

Then do a xy-plot or linear regression.

-Arka

On Mon, Oct 24, 2011 at 10:34 AM, Michael Weylandt [via R] <
ml-node+s789695n3933306...@n4.nabble.com> wrote:

> Comments inline.
>
> On Oct 24, 2011, at 1:43 AM, ajc <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=3933306&i=0>>
> wrote:
>
> > Hi All:
> >
> > If I download yahoo data by getSymbols() in R,
>
> from the quantmod package
>
> > the date column gets
> > accompanied along with the downloaded data. There is no column header for
>
> > the date column to access separately.
>
> The "date column" isn't a column in the same sense that the OHLC data is:
> rather its a time index which is fundamental to the time series object.
>
> > What is the way to eliminate the date column?
>
> Seems an ill-advised thing to do to a price series but coredata() or
> as.matrix will do it.
>
> >
> > If I want to draw a xy scatter plot with the downloaded price (suppose
> AAPL
> > vs NASDAQ), I think the date column is creating problem and the plot
> > function is not working.
>
> plot() is working as it should, but I think you are getting tripped up on
> R's method-dispatch/S3 system. Without code I can't be sure what you've
> tried but I'd guess you did something like
>
> plot(AAPL, NASDAQ)
>
> R notes that the first input is an xts so it automatically calls
> plot.xts(), which is a plot method for xts objects. plot.xts() throws an
> error/warning (can't remember which right now) because there's no sensible
> way to plot two time series against each other qua time series. Rather try
> this:
>
> plot( coredata(Cl(AAPL)), coredata(Cl(NASDAQ)) )
>
> This strips the time-series-ness from the close series and should produce
> the desired scatterplot. Offtopic, isn't this graph usually done in return
> space?
>
> >
> > Please advise on this as I am very new to R.
> >
> > Thanks.
> >
> >
> > --
> > View this message in context:
> http://r.789695.n4.nabble.com/Date-column-in-downloaded-date-tp3932125p3932125.html
> > Sent from the R help mailing list archive at Nabble.com.
> >
> > ______________________________________________
> > [hidden email] 
> > <http://user/SendEmail.jtp?type=node&node=3933306&i=1>mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
>
> ______________________________________________
> [hidden email] <http://user/SendEmail.jtp?type=node&node=3933306&i=2>mailing 
> list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://r.789695.n4.nabble.com/Date-column-in-downloaded-date-tp3932125p3933306.html
>  To unsubscribe from Date column in downloaded date, click 
> here<http://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3932125&code=YXJrb3NhcmtAZ21haWwuY29tfDM5MzIxMjV8OTg4MDgyMDYz>.
>
>


--
View this message in context: 
http://r.789695.n4.nabble.com/Date-column-in-downloaded-date-tp3932125p3935033.html
Sent from the R help mailing list archive at Nabble.com.
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to