This is my code:
library(datasets)
library(rCharts)
haireye = as.data.frame(HairEyeColor)
n1 = nPlot(Freq ~ Hair, group = 'Eye', type = 'multiBarChart', data = subset(haireye, Sex == 'Male'))
n1$save('fig/n1.html', cdn = TRUE)
cat('<iframe.src = "fight/n1.html" width = 100%, height = 600></iframe>')
If I just run
n1
it opens up the graph. However, when I try to open the saved file, it only displays a blank page. What am I doing wrong?