hair_eye_male <- subset(as.data.frame(HairEyeColor), Sex == "Male")
dataset = make_dataset('Hair', 'Freq', hair_eye_male, group = 'Eye')
u1 <- rCharts$new()
u1$setLib("libraries/widgets/uvcharts")
u1$set(
type = 'Bar',
categories = names(dataset),
dataset = dataset,
dom = 'chart1'
)
u1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.