rstudio / shiny-examples

Other
1.97k stars 3.77k forks source link

R shiny aggregate function #92

Open goood0001 opened 6 years ago

goood0001 commented 6 years ago

dta_agg<-aggregate(dta[,"id"]~passenger_count,dta,mean) barplot(dta_agg[,2],names.arg = dta$passenger_count,main=input$passenger_count, ylab="Number of Pickup location",xlab="users") This is the code i have tried and got an error :"incorrect number of names". Can you help me with this aggregate function.