nvd3Plot: Create NVD3 charts

View source: R/nvd3Plot.R

nvd3PlotR Documentation

Create NVD3 charts

Description

Main function to make new NVD3 chart

Usage

nvd3Plot(
  data,
  x,
  y,
  col = NULL,
  type = "boxplot",
  xlab = "X-axis",
  ylab = "Y-axis"
)

Arguments

data

data.frame

x, y

variables in quote e.i "var1"

col

color using variable

type

Chart type (see details)

xlab, ylab

Axis label

Examples

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")



alexym1/nvd3R documentation built on March 10, 2023, 5:31 p.m.