Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify getSymbols.SQLite #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

KuiMing
Copy link

@KuiMing KuiMing commented Dec 13, 2015

  1. Comment out setting of column names because Data are not just "OHLC".
  2. Order by first element of "db.fields".

1. Comment out setting of column names because Data are not just "OHLC".
2. Order by first element of "db.fields".
@braverock
Copy link
Collaborator

I think you're going to need to describe your rationale for the change to order_by. The data pulled ultimately needs to be converted to xts, so some standardization is required on the order_by data.

As for column names, I agree with the spirit that not all data is OHLCVA. I would suggest naming the columns for the columns in the SQLite data to start. Then, we could test for OHLC, BBO, etc using other functional already in quantmod for that purpose. Simply eliminating column name setting entirely doesn't seem like a general solution.

@joshuaulrich
Copy link
Owner

  1. Currently conflicts with issue Set column names to field.names in getSymbols.MySQL/SQLite #51, and will not be merged until it is consistent with the solutions proposed in that issue: i.e. simply not setting colnames isn't going to be merged, because it conflicts with intended functionality. Also, getSymbols.MySQL should be fixed too.
  2. This bug is described in [R-Forge #111] db.fields bug in getSymbols.MySQL #21, and also needs to be fixed in getSymbols.MySQL (maybe others).

@KuiMing
Copy link
Author

KuiMing commented Dec 14, 2015

  1. Data can be ordered by a new argument: "Date_col" that is the column name of date in database.

  2. Pseudo code:

    if there is col.names,
       colnames of output = col.names.
    else there is only df.fields, 
       colnames of output = df.fields without the column name of date.
    

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants