set_columntypes: Transform Columns

Description Usage Arguments Value

Description

This function is called automatically by load_sheet() if format.changed is false.

This function transforms the column types of the google sheet into appropriate data types. The location data is merged between the free-text "Other" field and the categorical choices the user can make. The other choices are transformed into factors, with the Length category transformed into an ordinal factor, increasing with the time spent at lunch. The timestamp is parsed into a POSIX-style datetime class, so that intuitive comparisons may be performed.

NOTE: If your google sheet departs from the format of the original, this function may introduce unexpected results. This function may be used as a model for any custom column transformation. I am not liable for any headache, heartache, or frustration induced by using this function on a custom sheet. You have been warned!

Usage

1

Arguments

tibble

- the input data frame or tibble from the googlesheet

Value

tibble - transformed and renamed columns of the appropriate type


jmiahjones/lunch.time documentation built on May 29, 2019, 1:05 a.m.