Re: [R] histogram of time-stamp data

2012-07-17 Thread e-letter
: Rui Barradas ruipbarra...@sapo.pt To: e-letter inp...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] histogram of time-stamp data Message-ID: 5003e377.3000...@sapo.pt Content-Type: text/plain; charset=ISO-8859-1; format=flowed timestamps - as.POSIXct(Sys.Date

Re: [R] histogram of time-stamp data

2012-07-17 Thread Rui Barradas
: -- Message: 77 Date: Mon, 16 Jul 2012 10:48:39 +0100 From: Rui Barradas ruipbarra...@sapo.pt To: e-letter inp...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] histogram of time-stamp data Message-ID: 5003e377.3000...@sapo.pt Content-Type: text/plain; charset=ISO-8859-1

Re: [R] histogram of time-stamp data

2012-07-17 Thread e-letter
On 17/07/2012, Rui Barradas ruipbarra...@sapo.pt wrote: Hello, That's not the error I've had. You must be aware that read.table creates a data.frame and therefore the object 'timestamps' is NOT holding time stamps, it's holding a vector, 'V1', of time stamps. Was not aware of the

[R] histogram of time-stamp data

2012-07-16 Thread e-letter
Readers, A data set consists of time-stamp values: 00:00:00 23:11:00 06:22:00 The data set was imported: timestamps-read.table(path/to/timestampsvalues) hist(timestamps) ...error... x must be numeric Then tried: plot(timestamps). How to adjust the graph to create a histogram where the

Re: [R] histogram of time-stamp data

2012-07-16 Thread Jessica Streicher
pDates-as.POSIXct(times,format=%H:%M:%S) hist(pDates,hours) On 16.07.2012, at 10:47, e-letter wrote: Readers, A data set consists of time-stamp values: 00:00:00 23:11:00 06:22:00 The data set was imported: timestamps-read.table(path/to/timestampsvalues) hist(timestamps)

Re: [R] histogram of time-stamp data

2012-07-16 Thread Rui Barradas
Hello, Try the following. timestamps - as.POSIXct(Sys.Date()) + sample(24*60*60, 1e3, TRUE) h1 - cut(timestamps, breaks=hour) h2 - cut(timestamps, breaks=15 mins) op - par(mfrow=c(1, 2)) hist(as.integer(h1)) hist(as.integer(h2)) par(op) Hope this helps, Rui Barradas Em 16-07-2012 09:47,

Re: [R] histogram of time-stamp data

2012-07-16 Thread e-letter
] histogram of time-stamp data Message-ID: 5003e377.3000...@sapo.pt Content-Type: text/plain; charset=ISO-8859-1; format=flowed timestamps - as.POSIXct(Sys.Date()) + sample(24*60*60, 1e3, TRUE) Why is it necessary to apply the sample to the current date? Looking at the dataframe, I noticed

Re: [R] histogram of time-stamp data

2012-07-16 Thread Rui Barradas
...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] histogram of time-stamp data Message-ID: 5003e377.3000...@sapo.pt Content-Type: text/plain; charset=ISO-8859-1; format=flowed timestamps - as.POSIXct(Sys.Date()) + sample(24*60*60, 1e3, TRUE) Why is it necessary to apply