write_time: Write a Daily Mini time to the Google Sheet.

Description Usage Arguments Value

Description

write_time takes a time provided by a specified user and writes that time to the corresponding cell in a data spreadsheet given by ss.

Usage

1
2
write_time(ss, d, time, user_col, date = Sys.Date(), shift = 0,
  overwrite = FALSE)

Arguments

ss

a googlesheet object (see googlesheet).

d

A data frame version of the "Data" worksheet in spreadsheet ss (see googlesheet).

time

Either an integer corresponding to a number of seconds elapsed (e.g., 42 or 142), or a character string in the form:

  • HH:MM:SS (e.g. "01:23:45")

  • MM:SS (e.g. "23:45")

  • SS (e.g. "45")

Any any number of hours, minutes, or seconds are valid (i.e., "0:03", "000:3", "3", and "00:00:03" are all valid ways to input three seconds).

user_col

A character string providing a username, which should correspond to a column in the spreadsheet.

date

an optional parameter to specify the date in a YYY-MM-DD format. Default is Sys.Date().

shift

An integer to define the number of days by which the data entry date should be shifted. Default is 0. The day after today (tomorrow) is +1, yesterday is -1, etc.

overwrite

A boolean to determine whether existing values in the cell should be overwritten. Default is FALSE.

Value

The function returns a message, stating which cell was written to, the value that was written, and if the cell was overwritten, a message to inform the user that the previous value was overwritten.


bochocki/slackrsheets documentation built on May 8, 2019, 9:46 a.m.