AssignDateAndDay: Assign a date to each row

Description Usage Arguments Details Author(s) See Also Examples

Description

This function uses a dataFrame and extracts the date from the field

assigned_at or created_at. It appends a vector of character

values with the date and the day of the week associated with those values.

Usage

1
AssignDateAndDay(dF, value = "assigned")

Arguments

dF

The dF that needs an weekday value.

value

The field that will be used the determine which day

of the week the call came into the call center.

Additional values include "created". The

default value will use the assigned_at field

in the dF.

Details

The dF passed to this function must have either the values

assigned_at or created_at as a vector of character date values.

The assumed format for the date values is from the strptime

function where format = "%Y-%m-%d %H:%M:%S".

This function uses weekdays to convert dates to the

day of the week.

Author(s)

Steven H. Ranney

Contact: Steven.Ranney@gmail.com

Steven Ranney

See Also

weekdays

strptime

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
assigned_at <- c("2014-01-01 11:37:00 -0800", "2014-01-02 09:24:05 -0800", 


                "2014-01-02 10:04:41 -0800")


dF<-as.data.frame(assigned_at)


newDf <- AssignDateAndDay(dF)

stevenranney/ispiranteRanney documentation built on May 30, 2019, 4:46 p.m.