nvd3Plot | R Documentation |
Main function to make new NVD3 chart
nvd3Plot( data, x, y, col = NULL, type = "boxplot", xlab = "X-axis", ylab = "Y-axis" )
data |
data.frame |
x, y |
variables in quote e.i "var1" |
col |
color using variable |
type |
Chart type (see details) |
xlab, ylab |
Axis label |
library(nvd3R) ### Boxplot mtcars %>% nvd3Plot(x = "cyl", y = "mpg", type = "boxplot", xlab = "Test1", ylab = "Test2") ### Multibarplot newdata02 <- data.frame( var1 = c("A", "B", "C", "D", "A", "B", "C", "D"), var2 = c(10,15,20,25,30,35,40,98), label = c("A", "A", "A", "A", "B", "B", "B", "B") ) newdata02 %>% nvd3Plot(x = "var1", y = "var2", col = "label", type = "multibarplot")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.