Either of these should work:
tt = c( "01:03:30", "18:21:03", "22:29:56", "23:03:20" ) y <- 1:4 require(chron) plot(chron(times=tt),y) # or plot(strptime(tt,format="%H:%M:%S"),y) --- Date: Tue, 11 Nov 2003 20:36:57 -0800 From: John <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Subject: [R] Time plot question. Hello, I have parsed out some data from a file containing output from the top command. The time stamps are of the form "hh:mm:ss". When the command plot( Time, FreeMemory, type = "l", col = "blue", main = "\"swap in use\" versus Time", xlab = "Time", ylab = "Swap in Use") is executed, the plot() function ignores the col and type arguments and plots the points in some sort of default manner. Do I need to use strptime() and reformat the "Time" coordinates? Where could I find some documentation on this, as the R docs that I am aware of do not contain an example of this. Any suggestions on this will be greatly appreciated. Cheers, John ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
