Description Usage Arguments Details Value References See Also Examples
download historic earnings and earnings estimates for a
given stock from http://earnings.com. One of the
columns of the data.frame
will be the Dates/Times
of the earnings release. These Dates/Times may have one
of a few different formats, most of which are ambiguous.
convertEarningsTime
will put the Dates/Times in an
unambiguous format; it will be called if
getEarnings
is called with doFormatTime =
TRUE
.
1 2 3 4 5 6 | getEarnings(Symbol, doFormatTime = TRUE,
return.tz = "America/Chicago",
return.class = c("xts", "data.frame"))
convertEarningsTime(x, date.format = "%d-%b-%y",
default.time = "AMC", return.tz = "America/Chicago")
|
Symbol |
character string ticker symbol of stock |
doFormatTime |
should the values of the Date/Time be re-formatted? (TRUE) |
return.tz |
timezone in which to represent Date/Time
of earnings release. ignored if |
return.class |
can be one of “xts” or “data.frame”. |
x |
character string representing a time or date |
date.format |
format of the date |
default.time |
what time to use if |
If one of the earnings Date/Time values contains “BMO” or “AMC”, it will be substituted with “07:00:00” and “16:15:00”, respectively in New York time.
for getEarnings
, it depends on
return.class
; If it is “xts”, an xts
object will be returned that will only contain the
numeric columns: “EPS.ESTIMATE”,
“EPS.ACTUAL”, and “PREV.YEAR.ACTUAL”. If
return.class
is “data.frame”, a
data.frame
will be returned that, in addition to
the columns of the xts, also contain columns
“Symbol”, “PERIOD”, “EVENT.TITLE”,
and “TIME”.
convertEarningsTime
will return a string
representing a date and time. in the format
“%Y-%m-%d %H:%M%:S %Z”
getHoldings
,
getFinancials
,
getDividends
,
get_div
, getSplits
,
get_spl
,
strftime
for formats
1 2 3 4 5 6 | ## Not run:
getEarnings('GOOG')
getEarnings("GOOG", return.class='data.frame')
getEarnings("GOOG", return.class='data.frame', doFormatTime=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.