: 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
:
--
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
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
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
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)
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,
] 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
...@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
8 matches
Mail list logo