Introducing the flipdownr package. Create a CountDown in Rmarkdown Documents and Shiny Apps

flipdownr

The goal of flipdownr is to create a Countdown object within your RMarkdown documents and Shiny application. flipdownr is an R wrapper of the JavaScript library flipdown

Installation

You can install flipdownr from CRAN with:

install.packages("flipdownr")

Functions and Arguments

flipdownr has one function: flipdown which contains the following arguments:


  • downto : the targeted date for the countdown. It must have the form of ‘yyyy-mm-dd’ or ‘yyyy-mm-dd hh:mm:ss`. Note that you can include the time zone (example UTC): ’yyyy-mm-dd hh:mm:ss UTC’;

  • id : the id of the countdown. Useful when you need to include many countdown objects in one document;

  • theme : The theme of the flipdown object. Two possible choices: ‘dark’ or ‘light’. Defaults to ‘dark’

  • headings : A character vector pecifying the heading related to each time part. Defaults to English headings: c(“Days”, “Hours”, “Minutes”, “Seconds”).

Examples:

This article was written the 2020-10-16 (16th of October 2020) at 16:13 (GMT+1) approximately, as such the CountDown will reflect it.

library(flipdownr)

flipdown(downto = "2020-11-16", id = "c1", theme = "dark")


You can add another level of precision by specifying the exact time:

flipdown(downto = "2020-11-16 22:30:00 UTC", id = "c2", theme = "dark")


You can also specify a light theme:

flipdown(downto = "2020-11-16", id = "clight", theme = "light")


You can modify the headers with the headings argument:

flipdown(downto = "2020-11-16",
         id = "cspanish", 
         theme = "light", 
         headings = c("Dias", "Horas", "Minutos", "Segundos"))

Code of Conduct

Please note that the website_iha project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Avatar
Mohamed El Fodil Ihaddaden
Ph.D candidate in Economics.

My research interests include Performance Management, Efficiency Analysis and Experimental Economics.