dyplot: Interactive time series

Description Usage Arguments

Description

This function plots an interactive time series using dygraph package.

Usage

1
2
3
4
dyplot(df, x = "date", vars, normalise = FALSE, dy.label = NA,
  tz = "UTC", draw.points = FALSE, point.size = 2, line.width = 0.5,
  connect.points = TRUE, highlight.individual = FALSE, dy.group = NA,
  ylab = NULL, ylim = NULL, ...)

Arguments

df

A dataframe containing variables to plot in a wide format.

x

Name of the variable to plot as x axis. Default is "date". Note that the this does not have to be a Date or POSIXct class variable. Regular numeric variable is also supported, such as year 2010, 2011, ...

vars

The name of variables to plot. If not supplied, all the numeric variables will be plotted.

normalise

Should the data be normalised. This is suitable for plotting variables of different scales. Default is FALSE.

dy.label

This specify the column containing additional info to add the dygraph. Default is NA.

tz

Time zone of the time series data.

draw.points

Draw points in the series? The default is FALSE.

point.size

Default value is 2, which is generally appropriate. A value of 0.5 is very subtle.

line.width

Default value is 0.5.

connect.points

Force the line to be drawn between points with gap. Default is TRUE.

dy.group

This specifies the group of the dygraphs. If multiple dygraphs are plotted and you want zooming in one of the graphs to be synced with other graphs, then set all the dygraphs to the same group.

ylab

Name of y axis.

ylim

Set the vertical range of the graph to c(low, high). See dyAxis.

...

other arguements passed to dygraph.


MohoWu/utilr documentation built on May 9, 2019, 2 a.m.