| v_smooth | R Documentation | 
Create an Smooth Line Chart
v_smooth(
  vc,
  mapping = NULL,
  data = NULL,
  name = NULL,
  method = NULL,
  formula = NULL,
  se = TRUE,
  n = 80,
  span = 0.75,
  ...,
  args_area = NULL,
  serie_id = NULL,
  data_id = NULL
)
vc | 
 A chart initialized with   | 
mapping | 
 Default list of aesthetic mappings to use for chart.  | 
data | 
 Default dataset to use for chart. If not already
a   | 
name | 
 Name for the serie, only used for single serie (no   | 
method | 
 Smoothing method (function) to use, accepts either
 For  If you have fewer than 1,000 observations but want to use the same   | 
formula | 
 Formula to use in smoothing function, eg.   | 
se | 
 Display confidence interval around smooth? (  | 
n | 
 Number of points at which to evaluate smoother.  | 
span | 
 Controls the amount of smoothing for the default loess smoother.
Smaller numbers produce wigglier lines, larger numbers produce smoother
lines. Only used with loess, i.e. when   | 
... | 
 Additional parameters for lines.  | 
args_area | 
 Arguments for area.  | 
data_id, serie_id | 
 ID for the data/serie, can be used to further customize the chart with   | 
A vchart() htmlwidget object.
library(vchartr)
data("mpg", package =  "ggplot2")
vchart(mpg, aes(displ, hwy)) %>%
  v_smooth()
vchart(mpg, aes(displ, hwy)) %>%
  v_smooth(se = FALSE)
vchart(mpg, aes(displ, hwy, color = class)) %>%
  v_smooth()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.