edit_data: Write a value to a Google Sheet.

Description Usage Arguments Details Value

Description

edit_data is a wrapper for gs_edit_cells that writes input to a worksheet called 'Data', in a cell specified by user_col and shift.

Usage

1
edit_data(ss, d, input, user_col, date = Sys.Date(), shift = 0)

Arguments

ss

a registered Google spreadsheet, i.e. a googlesheet object

d

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

input

new cell values, as an object that can be coerced into a character vector, presumably an atomic vector, a factor, a matrix or a data.frame

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.

Details

This function is not called directly, but is a helper function for write_time.

Value

Returns the version of input that was uploaded, either an HH:MM:SS transformation of the input, or the input as a character string.


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