Say I have the following object inside a knitr chunk:
df <- as.Date(c("2013-10-01", "2013-10-02", "2013-10-03"))
Now, when I try to run this:
`r min(df)` # that would be \Sexpr{min(df)} for a TeX file
I get the following error:
Error in Math.Date(x) : abs not defined for "Date" objects
Calls: knit ... .inline.hook -> format_sci -> vapply -> FUN -> Math.Date
Execution halted
knitr terminated with status 1
Is this a bug? How can I work around it?