host_import: Gathers hosts input data and formats

View source: R/input.R

host_importR Documentation

Gathers hosts input data and formats

Description

This takes a CSV with columns for Name, Room, and Times (separated by commas and spaces). This sort of file could come from a Google Sheet, for example, where hosts have filled in information about times in a form with checkboxes. If there are times like 8:30 am, 9 am, etc. and slot_minutes are 15 minutes, it will assume that if someone selects 8:30 they can make both 8:30 and 8:45 slots. It assumes last names are unique and uses the humaniformat package to extract them. If you want more precise slots, you can have slot_minutes less than input_minutes: they said this, say, 30 minute slot was available, which means that both 15 minute slots within could be free.

Usage

host_import(
  data,
  slot_minutes = 15,
  input_minutes = 30,
  extract_last_name = TRUE
)

Arguments

data

Input CSV file

slot_minutes

How long to make each slot

input_minutes

Resolution of the input slots

extract_last_name

If TRUE, extract last name; if FALSE, assume only last name given

Value

a list with availability array and a room vector (where names are last names)


bomeara/scheduleR documentation built on Jan. 21, 2025, 3:26 p.m.