0

I have a data frame recording the chat record of users like that:

V1        V2     V3  
10:00:01  Ben    Hello
10:01:10  Yuki   Ha
11:10:12  Tom    Hi
...
16:10:12  Ken   Bye

And I'd like to plot a time line recording that which user has spoken in which time.

There is a similar question: Chronological timeline with points in time and format date

But it is talking about the data of date and when I tried the code of first answer:

plot(NA,ylim=c(-1,1),xlim=rangeYM,ann=FALSE,axes=FALSE)

My version:
plot(NA,ylim = c(-1,1),xlim= range(df$V2), ann =FALSE, axes = FALSE) 

I have already got an error:Error in plot.window(...) : invalid 'xlim' value

Anyone can help? Thanks in advance!

Community
  • 1
  • 1
user5779223
  • 1,460
  • 3
  • 21
  • 42
  • Why aren't you making the "time" into POSIXct values and then setting the xlim tot he range of that column? Making the range on the basis of whar i probably a factor variable makes little sense. – IRTFM Jan 22 '16 at 18:16
  • @42- Thanks for reply! You are right! When I make it into POSIXct, no error this time. But until now I just find that my data value is too dense to just copy the way that question gives. Do you have any idea how to show it properly? – user5779223 Jan 23 '16 at 09:55

0 Answers0