rcharts - rRharts shows in Rstudio and browser but not R viewer -
morning community,
i wanted ask quick question regarding rcharts
graph outputs compared native r.
question 1: why graphs rcharts
displayed in browser rather viewer in r?
question 2: how can force (or choose use) graphing function in native r instead?
see these 2 screen shots:
code native r:
# simple scatterplot attach(mtcars) plot(wt, mpg, main="scatterplot example", xlab="car weight ", ylab="miles per gallon ", pch=19)
code rchart:
library(rcharts) mydata plot<-highcharts$new() plot$chart(polar = true, type = "line",height=null) plot$xaxis(categories=mydata$subject.id, tickmarkplacement= 'on', linewidth=1) plot$yaxis(gridlineinterpolation= 'circle', linewidth=1, min=null,max=null,endontick=t,tickinterval=10) plot$series(data = mydata[,"a"],name = "a", pointplacement="on") plot
rchart data used
subject.id b c 1 1 65 29 60 2 2 87 67 59 3 3 98 54 24 4 4 67 44 23 5 5 54 50 4 6 6 83 60 54 7 7 82 55 27 8 8 80 48 32 9 9 88 56 44 10 10 68 68 56 11 11 90 76 69 12 12 41 47 45 13 13 na 82 na 14 14 na 55 na
ps: aside, understand graphing 2 different functions, scatterplot vs radar plot. goal understand whether or not native r can display (or perhaps word) graph output rcharts - if lose interactivity.
i have reached out developer rcharts , has replied me:
"the native viewer comes r gui not capable of displaying html. so, way view html output rcharts generates use browser. rstudio viewer on other hand capable of displaying html , rcharts takes advantage of that."
Comments
Post a Comment