Description Usage Arguments Value
Parameters are the same as for generic_df_formatter_gen
, only the default values are slightliy different.
The real difference is in the closure returned: it accepts casenames (either string or integers). The formatter outputs all variables
encountered in the data.frame, so remove all unwanted variables before supply the data.frame.
1 2 3 4 5 6 7 8 9 10 11 12 | case_list_formatter_df_gen(df, case_name_var = NULL, case_names = NULL,
attr_rows = character(0),
variable_numeral = English_numeral$new(singular = "case", plural =
"cases", flag_skip_one = FALSE), flag_include_raw_name = TRUE,
all_except_infix_fn = all_except_infix_fn_en,
threshold_for_inversion = 0.8,
item_ellipsis_fn = item_ellipsis_fn_en, max_explicit_items_count = 7,
number_of_elements_around_ellipsis = c(3, 2), txt_separator = ", ",
txt_separator_last = " and ", txt_attribute_separator = ", ",
txt_attribute_separator_last = " and ", txt_attribute_prefix = " (",
txt_attribute_suffix = ")", txt_attribute_bare_quote = "`",
txt_attribute_label_quote = "", txt_attribute_infix = ": ")
|
all_except_infix_fn |
Function that can create a description of complementary notation in a natural language. The arguments are described later. Default function writes in English text "all items except for", using the |
threshold_for_inversion |
Number between 0 and 1 that describes the threshold of percentage of selected items to trigger a complementary notation. |
item_ellipsis_fn |
Function that can create an ellipsis notation in the middle of a long list. Defaults to a function that displays text ", 13 items more, " (assuming the item_numeral is for the noun "item"). |
max_explicit_items_count |
Maximal number of items to be ever displayed in comma separated list. Ellipsis notation will be used, if number of items exceed this value. |
number_of_elements_around_ellipsis |
Number of elements around the actual ellipsis, when the ellipsis is used. Must be a two element integer vector. Defaults to |
txt_separator |
String that separates list elements for all but last item. Defaults to ", ". |
txt_attribute_separator |
Simmilar to |
txt_attribute_separator_last |
Simmilar to |
txt_attribute_prefix |
String that gets pasted at the beginning of the attribute list. Defaults to "\ua0(". |
txt_attribute_suffix |
String that gets pasted at the beginning of the attribute list. Defaults to ")". |
txt_attribute_bare_quote |
If the attribute name is available only in its internal name (its label is not specified), this string will get pasted before and after. Defaults to markdown code "‘". This may be extended in future to allow formatting in different markup languages, which don’t use symmetric quotes, like LaTeX ( |
txt_attribute_label_quote |
The same as |
txt_attribute_infix |
The string that will be inserted between the attribute name and its value. Defaults to ":\uA0". |
A closure that turns a data.frame into a formatted list (as string)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.