Forum Discussion
pch and col function not working in R using Power BI
- 9 years ago
Hi abhishekpati86,
The chart is only able to show the year range under R when using the as.date (date format) function in R.
d1 <- aggregate(dataset$sales ~as.Date(dataset$date, orgin="%m/%d/%Y"), data=dataset,FUN=sum)
plot(d1,main="date Vs sales",pch=22,col="blue",xlab="date", ylab="sales",ylim=c(500,800))
The below is the as.date function reference:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/as.Date.html
See the result:
Check and see if this would be helpful. I will also take a further look into the X range part, and if any helpful things, I will post back.
Regards
Tagging MattAllington
- MattAllington10 years agoCommunity Champion
The list below covers what I know about R in Power BI
That concludes the list :-)
- abhishekpati8610 years agoHelper III
That was a cheeky response. I would appreciate if you can point out anyone who can help :)
- Greg_Deckler10 years agoCommunity Champion
Can you post your full R script so I can see what modules you are using and any chance you can post some sample data? Also, what R runtime are you using?