You must specify which library you want to import, depending on what type of plot you are using.
Below is a list of all available libraries from the rCharts package description.
datatables dimple highcharts leaflet morris nvd3 polycharts rickshaw vega xcharts
Here is the demo code on the rcharts website, and I modified it to build hplot.
ui.R
require(rCharts) shinyUI(pageWithSidebar( headerPanel("rCharts: Interactive Charts from R using highcharts"), sidebarPanel( selectInput(inputId = "x", label = "Choose X", choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'), selected = "SepalLength"), selectInput(inputId = "y", label = "Choose Y", choices = c('SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth'), selected = "SepalWidth") ), mainPanel( showOutput("myChart", "highcharts") ) ))
server.R
require(rCharts) shinyServer(function(input, output) { output$myChart <- renderChart({ names(iris) = gsub("\\.", "", names(iris)) # HPLOT p1 <- hPlot(input$x, input$y, data = iris, type = c("line", "bubble", "scatter"), group = "Species", size = 1) # RPLOT #p1 <- rPlot(input$x, input$y, data = iris, color = "Species", facet = "Species", type = 'point') p1$addParams(dom = 'myChart') return(p1) }) })
