vincentarelbundock / Rdatasets

A collection of datasets originally distributed in R packages

Home Page:https://vincentarelbundock.github.io/Rdatasets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to attach dates to the `EuStockMarkets` data set

michael-a-green opened this issue · comments

Hi Vincent,

How do you attach real dates to the EuStockMarkets data set? I think that the mts column in the EuStockMarkets data set you are sharing is missing, which may help me to get to where I need to go. Would you add that back?

Thanks,

Hi Michael,

I have never worked with objects of class mts. To save it as a CSV file, I first need to convert it to a data.frame in the get_data function of my scrape.R script. For example, here is how I convert objects of class ts:

https://github.com/vincentarelbundock/Rdatasets/blob/master/scrape.R#L25

Could you recommend a better way to convert mts objects to a simple data.frame that can be saved to CSV?

Closing this now, but feel free to reopen if you have a suggestion on the best way to proceed.