ggvis: Interaktionsdiagramm

Ich habe Interaktionsdiagramme mit @ erstellggplot2 und Code sind unten angegeben. Jetzt möchte ich die gleiche Handlung mit @ reproduzierggvis wie unten gezeigt, was nicht dasselbe wie @ iggplto2 Ausgabe. Ich würde mich sehr freuen, wenn jemand mich darauf hinweist, dass ich die gleiche Handlung mit `ggvis machen soll. Danke im Voraus

library(ggplot2)
p <- qplot(as.factor(dose), len, data=ToothGrowth, geom = "boxplot", color = supp) + theme_bw()
p <- p + labs(x="Dose", y="Response")
p <- p + stat_summary(fun.y = mean, geom = "point", color = "blue", aes(group=supp))
p <- p + stat_summary(fun.y = mean, geom = "line", aes(group = supp))
p <- p  + theme(axis.title.x = element_text(size = 12, hjust = 0.54, vjust = 0))
p <- p  + theme(axis.title.y = element_text(size = 12, angle = 90,  vjust = 0.25))
print(p)

library(ggvis)
ggvis(data=ToothGrowth, x= ~as.factor(dose), y= ~len, fill= ~supp, stroke = ~supp) %>% 
  layer_points(shape=~supp) %>% 
  layer_lines(fillOpacity=0)

Antworten auf die Frage(2)

Ihre Antwort auf die Frage