read_config | R Documentation |
Read WordBox configuration from a file.
read_config(file)
get_default_config_file()
file |
character giving the path to the file |
The configuration file must be a JSON file containing a single object with three fields:
"boxes"
a single integer indicating the number of boxes to be used.
"counts"
an integer array with one less elements
than there are boxes. The numbers indicate for each box, how
often the word must be correctly answered before it is moved
to the next box. For the last box, the value is automatically
set to Inf
, since a word cannot be moved further than
the last box.
"days"
an integer array with one element per box. For each box, this gives the number of days that a word is not quizzed, after it has been correctly answered.
"counts_new"
a single integer. Words in box 1 with
count less than counts_new
are considered to be new and
are thus quizzed when quiz_type = "newwords"
is used
in prepare_quiz
.
"n_new"
a single integer that defines how many
words are quizzed at a time when quiz_type = "newwords"
.
get_default_config_file()
returns the path to the
default configuration file. To look at its contents, run
file.show(get_default_config_file())
a list containing the configuration data.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.