【问题标题】:R-Date and time analysisR-日期和时间分析
【发布时间】:2015-10-30 12:27:17
【问题描述】:

我正在进行预订/预订数据分析,以确定最受欢迎的时间和最不受欢迎的时间(可以在高峰时段增加人员配置,并在平静期间减少人员配置)。我尝试了日期和时间的ggplot,希望看到一个高峰和平静。我收到了这个错误:

ggplot(aes(x=dates, y=time),data=try)+geom_line error

不知道如何将geom_line 添加到此情节中

【问题讨论】:

    标签: r


    【解决方案1】:

    我们需要() 来让它工作

      ggplot(aes(x=dates, y=time), data=try)+geom_line
      #Error: Don't know how to add geom_line to a plot
      ggplot(aes(x=dates, y=time), data=try)+geom_line()
    

    数据

      try <- data.frame(dates=1:5, time= sample(20, 5, replace=TRUE))
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-08
      • 1970-01-01
      相关资源
      最近更新 更多