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

Error in getQuote.yahoo #219

Closed
ghost opened this issue Mar 9, 2018 · 2 comments
Closed

Error in getQuote.yahoo #219

ghost opened this issue Mar 9, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 9, 2018

Description

Undefined Column Selected - Not all quoteFormat (QF) are pulling data in getQuote()

Reason

The query from yahoo is probably not returning the data for all required fields in getQuote.yahoo

Error Location

Following line is resulting in error due to undefined columns selected (fields which are not present in yahoo query json response.)

[df <- data.frame(Qposix, sq[,QF])  ## line 82 of getQuote.R , part of function getQuote.yahoo ]

possible fix

Add the following line after line after line 62 (and before 82)

sq[,QF[!QF%in%names(sq)]]<-NA  ## Give NA value to columns not present
@joshuaulrich
Copy link
Owner

joshuaulrich commented Mar 9, 2018 via email

@ghost
Copy link
Author

ghost commented Mar 9, 2018

its same

@ghost ghost closed this as completed Mar 9, 2018
This issue was closed.
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

No branches or pull requests

1 participant