gc_event_import: Import a table of calendar events

Description Usage Arguments Details Value Examples

Description

Imports a delimited file into Google Calendar, creating one event for every row in a table. This method operates on the Google Calendar API Events resource.

Usage

1
gc_event_import(x, events, sendNotifications = FALSE, verbose = TRUE)

Arguments

x

googlecalendar object representing the calendar in which to create the event.

events

data.frame-like object or file path to the table to be imported.

sendNotifications

Logical indicating whether to send notifications about the event.

verbose

Logical indicating whether to print informative messages.

Details

In order for gc_event_import to operate, it must be supplied with a source that complies with the following naming convention for column headers:

When reading event import tables R, be careful that your input method preserves the header names and does not improperly coerce column types. For example, with read.csv, you may need to set check.names = FALSE and with readr's read_csv, you may need to set col_types = cols(.default = "c").

Note that it may not be possible to represent all properties of an event within the scalar confines of a single CSV-type row (the attendees sub-structure is an example of one such group of arbitrary-length properties). However, careful preprocessing of an input table may enable you to overcome this restriction. See the project README on GitHub for some examples of this.

Value

Character vector of the newly created event IDs.

Examples

1
2
3
4
5
6
7
## Not run: 
tbl <- read.csv("sunsets.csv", stringsAsFactors = FALSE)

gc_summary("Sunsets") %>%
  gc_event_import(tbl)

## End(Not run)

benjcunningham/googlecalendar documentation built on May 12, 2019, 11:56 a.m.