The polyglot package lets you use the R console as an interactive learning environment in order to memorize any dataset you want. Its main goal is to put foreign language vocabulary learning in the R workflow, so R can also be used to study languages or anything related to flashcards.
To install and run polyglot, type the following in the R console:
install.packages("polyglot")
library(polyglot)
learn() # to launch the interactive learning environment
Before launching the interactive environment, be sure to have the appropriate locale settings.
To learn French vocabulary for instance, type the following in the R console:
Sys.setlocale("LC_TIME", "French") # for Windows
Sys.setlocale("LC_TIME", "fr_FR") # for macOS
Sys.setlocale("LC_TIME", "fr_FR.utf8") # for Modern Linux etc.
If you have any problem with the encoding, or if you want to read a dataset with an non-Latin alphabet, please type ?Sys.setlocale()
and follow the instructions.
If you want to open the directory containing the datasets to add your own dataset in an CSV format, type the following:
library(polyglot)
learnDir()
Go here to read a blog post describing the package with more development.
Happy learning!