How can I a draw a linechart with rcharts using nvd3 and a categorical xaxis? What I'm trying to do would look with ggplot2 like this:
library(ggplot2)
dat <- data.frame(expand.grid(group = letters[1:3], x = letters[4:6]), y = rnorm(9))
ggplot(dat, aes(x = x, y = y, group = group, color = group)) + geom_line()
I tried:
library(rCharts)
nPlot(y ~ x, group = 'group', data = dat, type = 'lineChart')
I know that I could change x to a numeric variable, but then the xaxis labels would not be correctly written.