lab_presenters: Randomize presenters and upload them to Google Drive

View source: R/lab_presenters.R

lab_presentersR Documentation

Randomize presenters and upload them to Google Drive

Description

This function takes a set of presenter names and randomizes them into groups of size n based on the start_date. The resulting table is then uploaded to Google Drive. If the sheet_name exists, it's updated, otherwise a new spreadsheet is created which you can share later.

Usage

lab_presenters(
  presenters,
  start_date = "2019-09-18",
  sheet_name = "Jaffelab research presenters",
  n = 2,
  repeat_day = 7
)

Arguments

presenters

A character() vector of presenter names.

start_date

A character(1) vector with the start date in a YYYY-MM-DD format.

sheet_name

A character(1) vector with the name of the Google Drive spreadsheet that will be updated (or created if it doesn't exist).

n

The number of presenters per meeting.

repeat_day

An integer(1) with the number of days between lab meetings. Use 7 for a weekly lab meeting.

Value

A one row table with the googledrive information for the file that was uploaded.

Author(s)

Leonardo Collado-Torres

See Also

googledrive_csv

Examples


## Presenters as of 2019-09-12
jaffe_research_presenters <- c(
    "Brianna", "Emily", "Josh", "Kira", "Leo",
    "Maddy", "Matt", "Nick"
)

if (googledrive::drive_has_token()) {
    ## You'll need to have access to Google Drive through
    ## googledrive::drive_auth() set up.

    ## Set the seed for reproducibility of the results
    set.seed(20190918)

    ## Update lab presenters sheet
    lab_presenters(
        presenters = jaffe_research_presenters,
        start_date = "2019-09-18",
        sheet_name = "Jaffelab research presenters - example",
        n = 2
    )

    ## If it's a new sheet, we recommend sharing an editable link so other
    ## lab members can swap out as necessary.
}

LieberInstitute/jaffelab documentation built on Dec. 15, 2024, 10:44 p.m.