You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
Submitted by: Radek Maciaszek
Assigned to: Joshua Ulrich
R-Forge link
To replicate:
install.packages('quantmod', repos='http://r-forge.r-project.org')
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
The text was updated successfully, but these errors were encountered: