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

[R-Forge #2383] getFin() doesn't work #4

Closed
joshuaulrich opened this issue Jan 31, 2015 · 0 comments
Closed

[R-Forge #2383] getFin() doesn't work #4

joshuaulrich opened this issue Jan 31, 2015 · 0 comments
Labels

Comments

@joshuaulrich
Copy link
Owner

Submitted by: Radek Maciaszek
Assigned to: Joshua Ulrich
R-Forge link

To replicate:
install.packages('quantmod', repos='http://r-forge.r-project.org')

m <- getFinancials('MMM')
Warning message:
In readLines(tmp) :
incomplete final line found on '/tmp/Rtmpx3fWOf/file461821442a0b'
m
[1] 'MMM.f'
viewFin(m)
Error in viewFin(m) : ‘x’ must be of type ‘financials’

I've tried this in both windows and linux, versions from both the r-forge and cran.

Followups:

Date: 2013-01-20 17:26
Sender: Joshua Ulrich
As Garrett See said, this is expected behavior, therefore not a bug.

Date: 2012-11-24 00:24
Sender: Radek Maciaszek
This warning message made me think something is just wrong with parsing of the answer, plus the variable was created which confused me further but it actually works after setting the auto.assign! Thanks a lot.

Any way to eliminate that warning? Maybe we should append empty line to the file before storing it?

Date: 2012-11-23 20:52
Sender: Garrett See
This is expected behavior. getFinancials() is similar to getSymbols() in that it has an auto.assign argument that is TRUE by default. So, when you assign the results of your call to m, you are really just assigning the name of the object that was assigned in the .GlobalEnv. Then, you are calling viewFin() with m which is 'character', not 'financials'

Here are 2 solutions:

m <- getFinancials('MMM', auto.assign=FALSE)
viewFin(m)

getFinancials('MMM')
viewFin(MMM.f)

Date: 2012-11-20 10:01
Sender: Radek Maciaszek
The same issue was reported here:
https://stat.ethz.ch/pipermail/r-sig-finance/2012q1/009631.html

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

No branches or pull requests

1 participant