histogram_plot <- function(varnames,binwidth,dataset){ graph <- ggplot(aes(x = varnames),data = dataset)+ geom_histogram(binwidth = binwidth) return(graph) } histgram_plot(viewsCount,50,timeline)+ xlim(c(0,8000)) Code as above, create a n...
topic description data source, the diamonds, preview of the ggplot2 package is as follows mean(diamonds[which(diamonds$cut== Ideal ),]$price) problem description 1, is there a more convenient way to calculate the mean value of the y-axis of a ba...
copy the theme setting code in "R language practice " by hand. I don t know why I always report an error. The code is as follows: library(ggplot2) data(Salaries, package= car ) mytheme<-(plot.title=element_text(face= bold.italic ,size=14,colo...