Dygraphs
R interface to dygraphs
Install / Use
/learn @rstudio/DygraphsREADME
dygraphs for R
<!-- badges: start --> <!-- badges: end -->The dygraphs package is an R interface to the dygraphs JavaScript charting library. It provides rich facilites for charting time-series data in R, including:
- Automatically plots xts time series objects (or any object convertible to xts).
- Highly configurable axis and series display (including optional second Y-axis).
- Rich interactive features including zoom/pan and series/point highlighting.
- Display upper/lower bars (e.g. prediction intervals) around series.
- Various graph overlays including shaded regions, event lines, and point annotations.
- Use at the R console just like conventional R plots (via RStudio Viewer).
- Seamless embedding within R Markdown documents and Shiny web applications.
Installation
The dygraphs package depends on the development version of the htmlwidgets package so you need to install both packages. You can do this using the devtools package as follows:
devtools::install_github(c("ramnathv/htmlwidgets", "rstudio/dygraphs"))
Usage
If you have an xts-compatible time-series object creating an interactive plot of it is as simple as this:
dygraph(nhtemp, main = "New Haven Temperatures")
You can also further customize axes and series display as well as add interacitve features like a range selector:
dygraph(nhtemp, main = "New Haven Temperatures") %>%
dyAxis("y", label = "Temp (F)", valueRange = c(40, 60)) %>%
dyOptions(fillGraph = TRUE, drawGrid = FALSE) %>%
dyRangeSelector()
See the online documentation for the dygraphs package for additional details and examples.
Related Skills
node-connect
352.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
