knitr::opts_chunk$set(comment = "#>", collapse = TRUE)

Working with r2anki

This document demonstrates how you may use the r2anki-package.

To do this, a few Anki-cards are defined below, which you can import into Anki. If you do your homework there, you shouldn't easily forget how to work with this package any longer. ;-)

General Information


What is r2anki

What can you use this package for?

r2anki brings R to Anki. It allows you to easily create Anki-cards with R Markdown in R, which you can than export to Anki. There you can study and rehearse the cards to effectively expand your R-vocabulary.


What is Spaced Repitition?

Whats the idea behind it and why is it useful?

Spaced Repition is a learning technique, that helps you to learn and remember new knowledge effectively. It accounts for the fact, that well-know material needs to be rehearsed much less often than new material. Ideally the optimal time interval for every card is estimated individually, which is for example implemented in the Anki-algorithm.

Learn more about Spaced Repitition on Wikipedia.

Necessary preparations (required only once)


Requirements of Using r2anki

Which software do you need to install prior to using r2anki?

Because r2anki connects R to Anki. You need to have (R and) Anki installed. You should also import the r2anki-Notetype to Anki, so that the markup for the Anki-cards looks nice.

r2anki::install_anki() is a little function to help get you started. :-)


r2anki-Initialization

When you first want to use r2anki, you need to initialize Anki Why is this necessary and how do you do it?

In Anki the styling of the cards is defined by "Note Types", which may contain html and CSS-information. r2anki::r2anki(init = TRUE) will copy a few Anki-cards with the r2anki-styling to Anki, so that the R Markdown-output can be rendered properly.

Working with r2anki


How do you create your own r2anki-notebook?

You can give yourself a headstart by using the R Markdown-Template, that comes with r2anki. You can also use the RStudio-addin to add a new card to your notebook.

Basically any R Markdown-file, that contains r2anki-cards (defined by a certain markup) can be parsed to an Anki-deck.


How do you export cards from an r2anki-notbook to Anki?

How do you get your cards from the r2anki-notebook exported to Anki?

You just save the r2anki-notebook and call r2anki::r2anki() on the Rmd-file. When you set invoke_anki = TRUE Anki will automatically be started, ready to import your cards.


How to import r2anki-cards into Anki

What should be kept in mind to ensure a sucessful import of r2anki-cards?

Please make sure to


Where can you look for other r2anki-decks?

Writing cards seems take some effort. Where can I find existing r2nki-decks?

Take a look at https://github.com/henningsway/r2anki-notebooks. Please consider providing the cards you wrote to other users as well. Thank you! :)



henningsway/r2anki documentation built on March 24, 2021, 6:34 a.m.