Skip to contents

This function prints a list of flashcard decks to the console and let's the user choose one of the decks. By default, the function searches the flashr_decks repo. But other GitHub repos can be used.

To narrow the results, include text in the pattern argument (for example, choose_deck(pattern = "r4ds")).

Usage

choose_deck(
  pattern = NULL,
  choice = NULL,
  repo = "JeffreyRStevens/flashr_decks"
)

Arguments

pattern

String pattern to search in list of decks.

choice

Integer value of choice from list of decks if you already know which deck you would like to use without listing again.

repo

GitHub username and repo for deck repository in the format of "username/repository". Default value is "JeffreyRStevens/flashr_decks".

Value

Outputs a list of available built-in flashcard decks to the console, where the user can choose one of the decks to generate flashcards.

See also

Other functions for finding decks: list_decks()

Examples

if (FALSE) { # interactive()
if (FALSE) { # \dontrun{
# Choose from all available decks in default repository
choose_deck()

# Choose from decks including text matching pattern
choose_deck(pattern = "r4ds")

# Choose from decks from specific repository
choose_deck(repo = "JeffreyRStevens/flashr_decks")
} # }
}