[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Anyone familiar with R?
- Subject: [ale] Anyone familiar with R?
- From: glallen01 at gmail.com (George Allen)
- Date: Tue, 5 Apr 2011 09:24:48 -0400
- In-reply-to: <[email protected]>
- References: <[email protected]>
Nevermind, typo fixed it. Doh!
s/2010/2011/g
On Tue, Apr 5, 2011 at 9:23 AM, George Allen <glallen01 at gmail.com> wrote:
> I'm trying to learn R, as well as analyze some data out of Cisco
> Unified Contact Center (call center setup) for a helpdesk. UCCX has an
> app that will generate reports via crystal reports into excel, but
> it's cumbersome and doesn't exactly generate what I want.
>
> So...
>
> Have a data set like:
>
>> head(z)
> ? ?r$SESSION.ID ? ? ?START_DATETIME QUEUE.TIME TALK.TIME HOLD.TIME WORK.TIME
> 1 1-5000003350-0 2011-03-01 07:00:03 ? ? ? ?297 ? ? ? 134 ? ? ? ? 0 ? ? ? ? 4
> 2 1-5000003351-0 2011-03-01 07:02:23 ? ? ? ?234 ? ? ? 404 ? ? ? ? 0 ? ? ? ?30
> 3 1-5000003353-0 2011-03-01 07:05:33 ? ? ? ?120 ? ? ? 214 ? ? ? ? 0 ? ? ? ?30
> 4 1-5000003356-0 2011-03-01 07:09:32 ? ? ? ?137 ? ? ? 229 ? ? ? ? 0 ? ? ? ?30
> 5 1-5000003358-0 2011-03-01 07:12:49 ? ? ? ? 69 ? ? ? 577 ? ? ? ? 0 ? ? ? ?30
> 6 1-5000003360-0 2011-03-01 07:21:38 ? ? ? ? 29 ? ? ? 288 ? ? ? ? 0 ? ? ? ?30
>
> and I want to do something like:
>
> subset(z, z$START_DATETIME >= as.POSIXlt('2010-03-01') |
> z$START_DATETIME <= as.POSIXlt('2010-03-07'), "START_DATETIME")
>
> to pull one week's worth of data, but instead it dumps the whole dataframe.
> Ultimately, I want to do this:
>
> hist(z[z$START_DATETIME >= as.POSIXct('2010-03-01') | z$START_DATETIME
> <= as.POSIXct('2010-03-07'), "START_DATETIME"], 'hours', freq=TRUE)
>
> and have it dump only that first week, currently it does the whole set...
>