To create a data frame of functions that can be used to create a flashcard
deck, use build_functions_df(). This function calls extract_functions()
to find the functions if the file argument is specified. Otherwise, users
can pass a character vector of function names to the fs argument. Either
way, a title must be passed to title to create the data frame.
Users can then either complete the description column of the data frame
with their own descriptions or set the desc argument to TRUE to use
descriptions from
flashr_decks.
build_functions_df(file = NULL, fs = NULL, title, desc = TRUE, omit = TRUE)Data frame suitable to include in flashcard().
Character string of file name for text that includes code blocks. Can be local file or URL.
If not using a file, character vector of functions
[do not include ()].
Character string of title for flashcard deck (required)
Logical for whether to search for descriptions from flashr_decks (default is TRUE, which includes descriptions from flashr_decks).
Logical for whether to omit terms that have no descriptions from flashr_decks (default is TRUE, which omits terms with no descriptions).
Other functions for extracting code and functions:
extract_code(),
extract_functions()
build_functions_df(fs = c("apple", "apply", "+"), title = "Test")
Run the code above in your browser using DataLab