When trying to Knit my dygraph in R using Knitr:
library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures") %>%
dyRangeSelector(dateWindow = c("1920-01-01", "1960-01-01"))
I get the following error:
## Error in validateCssUnit(sizeInfo$width): "\maxwidth" is not a
valid CSS unit (e.g., "100%", "400px", "auto")
Could anyone assist with how I can possibly fix this or what it means?
EDIT: Example code.
\documentclass{article}
\begin{document}
<<include=FALSE>>=
library(knitr)
options(width=55, formatR.arrow=TRUE, highlight=TRUE, scipen=1, digits=3, tidy=TRUE, comment='##') opts_chunk$set(fig.width=4, fig.height=4, fig.align='center', tidy=TRUE, highlight=TRUE, cache=TRUE, dev='tikz', fig.path='figure/', cache.path='cache/')
@
<<include=FALSE>>=
library(tikzDevice)
@
<<>>=
library(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures")
@
\end{document}