The goal of the lunch
package is to keep users informed about the
lunch menu at MPI.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("T-Engel/lunch")
Here, is how you can check the menu:
library(lunch)
whatsforlunch()
You’ll be prompted with a message commenting on the menu and giving you
food alerts.
Click Yes to proceed to the website:
lunch
has some sensible default alerts that people generaly like to
know about. “Kroketten” like in the example above is surely one of them.
Here is the full list of pre-set alerts:
#> guacamole avocado kroketten pommes pizza
lunch
also lets you set your own alerts. For example, if you die for
kartoffelpüree and aubergine you can tell the package and it will
remember. Here is how:
set_my_lunch_alerts(alerts = c("kartoffelpüree", "aubergine"))
This function will generate a string, copy it to your clipboard and ask you to save it in your R.environ file. No worries, it’ll also find the file for you if you like. Just click “yes” in the next prompt:
This is how your R.environ file might look like. Probably it’s empty.
But maybe you have some other definitions in there:
Just paste the string from your clipboard into the file (ctrl+v), save it (ctrl+s) and restart R (crtl+shift+F10).
When you now reload lunch
, it’ll remember your food alerts
library(lunch)
whatsforlunch()
It looks like we’re lucky and they do infact have Kartoffelpüree this week. Click “yes” to proceed to the menu.
Enjoy your lunch
!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.