Learn Foreign Language Vocabulary

Use the R console as an interactive learning environment to memorize any two columns dataset.

The polyglot package helps you learn foreign language vocabulary or any flashcards using R as an interactive learning environment. The package implements the popular SuperMemo-2 learning algorithm which optimizes intervals between repetitions, minimizes the time you spend on learning, and helps you achieve your learning goals in the most effective way.


install.packages("polyglot") # or devtools::install_github("lgnbhl/polyglot")
# BEWARE that a new installation overwrites existing CSV files

Minimal examples

Create a spreadsheet in a CSV format with a question column, an answer column and an hint/example column (optional).

For example, you could make a spreadsheet of 30 basic expressions in French (the CSV file is already into the package).

The spreadsheet should be saved into the extdata directory of the package.

To open the directory, simply run the learn_dir() function.


To launch the learning environment, run the learn() function. Then choose in the interactive menu the file you want to study.

learn() # to launch the interactive learning environment

The GIF below shows the learning of the CSV file French_30_Basic_Expressions.csv.

Learn with images

You can add images by putting the Web URL or the full path of your images into the spreadsheet rows.

For example, you can study the locations, flags and capitals of all the sovereign states around the world. Note that the images into the 3rd column Hint are displayed into your Web browser.

You could also memorize the recipes of the 74 official cocktails of the International Bartenders Association (IBA).

The CSV files given as examples are here.

Happy learning!


Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3.0 by Félix Luginbuhl, a year ago

https://felixluginbuhl.com/polyglot, https://github.com/lgnbhl/polyglot

Report a bug at https://github.com/lgnbhl/polyglot/issues

Browse source code at https://github.com/cran/polyglot

Authors: Félix Luginbuhl [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports utils, magick, pins

See at CRAN