这是我的代码:
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>')
如果我只是跑
n1
它打开了图表。但是,当我尝试打开保存的文件时,它只显示一个空白页面。我做错了什么?