n1 <- nPlot(mpg ~ wt, data = mtcars, group = "gear", type = "scatterChart") n1$addControls("x", value = "wt", values = names(mtcars)) n1$addControls("group", value = "gear", values = names(mtcars)) n1