Line Graph for dates upon which variable a exists with variable b?

I'm new to stats, R, and programming in general, having only had a short course before being thrown in at the deep end. I am keen to work things out for myself, however. My first task is to check the data I have been given for anomalies. I have been given a spreadsheet with columns `Date`, `PersonID` and `PlaceID`. I assumed that if I plotted each factor of `PersonID` against `Date`, a straight line would show that there were no anomalies, as `PersonID` should only be able to exist in one place at one time. However, I am concerned that if there are 2 of the same `PersonID` on one `Date`, my plot has no way of showing this. I used the simple code: require(ggplot2) qplot(Date,PersonID) My issue is that I am unsure of how to factor the `Date` into this problem. Essentially, I am trying to check that no `PersonID` appears in more than one `PlaceID` on the same `Date`, and having been trying for 2 days, cannot figure out how to put all 3 of these variables on the same plot. I am not asking for someone to write the code for me. I just want to know if I am on the right train of thought, and if so, how I should think about asking R to plot this. Can anybody help me? Apologies if this question is rather long winded, or posted in the wrong place.
Why do you want to use a plot to do this?

以上就是Line Graph for dates upon which variable a exists with variable b?的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准