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:
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前端其它相关文章！