I am trying to get the current price of gold for my application. I am
using the library quantmod. The
R commands I use are:
getMetals(c('XAU'), from=Sys.Date(), autoassign = FALSE )
XAUUSD$XAU.USD[1,1]
I would expect the value in XAUUSD$XAU.USD[1,1] to be a scalar but it
comes back with a date and a number. All I want is the current value,
not today's date. How do I just get the value?
Thanks
Bob
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.