我有一个带有日期列的数据框。我正在尝试获取每个日期的频率计数。我以为直方图可以很好地可视化数据,但是也许有更好的方法?我能够创建数据的直方图,但这并不是我想要的。我希望在x轴上获得每个单独的日期,在y轴上获得频率计数。
我已经在R中进行了一些编程,但是在R中没有进行太多的可视化。任何帮助将不胜感激。
RawDates<- c("11/8/2017","12/6/2017","10/6/2017","12/6/2017","1/24/2018","9/5/2017","1/24/2018","2/21/2018","10/12/2017","1/22/2018","5/2/2018","1/24/2018","10/12/2017","1/22/2018","2/21/2018","5/2/2018","3/12/2018","5/3/2018","11/7/2017","12/5/2017","9/8/2017","10/6/2017","10/5/2017","11/3/2017","12/6/2017","2/21/2018","11/2/2017","12/5/2017","5/2/2018","1/24/2018","9/6/2017","11/2/2017","2/21/2018","5/2/2018","1/24/2018","11/8/2017","3/12/2018","5/3/2018","1/24/2018")
FormattedDates <- as.Date(RawDates, format = "%m/%d/%Y")
df <- data.frame(FormattedDates)
##This is whatI have already tried
hist(df$FormattedDates, "days", format = "%m/%d/%Y")