Description Usage Arguments Note Examples
This function generates random assignments or secret santa and emails the participants if desired.
1 2 3 |
p.df |
Data frame with information for each individual. Columns need to be 'giver' and 'couple', with 'email' optional. The 'couple' identifies significant others numerically (i.e., spouses have the same number) |
email |
Logical argument for whether or not participants should automatically be emailed; defaults to FALSE |
organizer |
If email=TRUE, email address of the organizer |
subject |
If email=TRUE, subject of the email |
host.nm |
If email=TRUE, host.name for mailR; defaults to "smtp.gmail.com" |
prt |
If email=TRUE, smtp port; defaults to 465 |
usr.nm |
If email=TRUE, email username |
pswd |
If email=TRUE, email/application email |
giftLim |
If email=TRUE, the gift limit entered just as a number |
Sending emails requires installation of the mailR package. If you are using Gmail, the two-factor authentication requires an application password - not your normal account password.
1 2 3 4 5 6 7 8 9 | # A group with two couples and two additional individuals
p.df <- data.frame(giver=LETTERS[1:6],
couple=c(1,1,2,2,3,4))
santa(p.df, email=FALSE)
p.df$email <- "tisz1545@colorado.edu"
santa(p.df, email=TRUE, organizer="tim.szewczyk@gmail.com",
subject="2017 Secret Santa", usr.nm="tim.szewczyk",
pswd="xxxxxxxxxxxx", giftLim=20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.