| define_keywords {summarytools} | R Documentation |
Modify Keywords Used In Outputs
Description
As an alternative to use_custom_lang, this function allows
temporarily modifying the pre-defined terms in the outputs.
Usage
define_keywords(..., ask = FALSE, file = NA)
Arguments
... |
One or more pairs of keywords and their new values see Details for the complete list of existing keywords. |
ask |
Logical. When 'TRUE' (default), a dialog box comes up to ask whether to save the edited values in a csv file for later use. |
file |
Character. Path and name of custom language file to be saved.
This comma delimited file can be reused by calling
|
Details
On systems with GUI capabilities, a window will pop-up when calling
define_keywords() without any parameters, allowing the modification
of the custom column. The changes will be active as long as the
package is loaded. When the edit window is closed, a dialog will pop up,
prompting the user to save the modified set of keywords in a custom csv
language file that can later be used with use_custom_lang.
Here is the full list of modifiable keywords.
- title.freq
main heading for
freq()- title.freq.weighted
main heading for
freq()(weighted)- title.ctable
main heading for
ctable()- title.ctable.weighted
main heading
ctable()(weighted)- title.ctable.row
indicates what proportions are displayed
- title.ctable.col
indicates what proportions are displayed
- title.ctable.tot
indicates what proportions are displayed
- title.descr
main heading for
descr()- title.descr.weighted
main heading for
descr()(weighted)- title.dfSummary
main heading for
dfSummary()- n
heading item used in
descr()- dimensions
heading item used in
dfSummary()- duplicates
heading item used in
dfSummary()- data.frame
heading item (all functions)
- label
heading item (all functions) & column name in
dfSummary()- variable
heading item (all functions) & column name in
dfSummary()- group
heading item (all functions when used with
stby()- by
heading item for
descr()when used with stby()- weights
heading item -
descr()&freq()- type
heading item for
freq()- logical
heading item - type in
freq()- character
heading item - type in
freq()- numeric
heading item - type in
freq()- factor
heading item - type in
freq()- factor.ordered
heading item - type in
freq()- date
heading item - type in
freq()- datetime
heading item - type in
freq()- freq
column name in
freq()- pct
column name in
freq()whenreport.nas=FALSE- pct.valid.f
column name in
freq()- pct.valid.cum
column name in
freq()- pct.total
column name in
freq()- pct.total.cum
column name in
freq()- pct.cum
column name in
freq()- valid
column name in
freq()anddfSummary()& column content indfSummary()- invalid
column content in
dfSummary()(emails)- total
column grouping in
freq(), html version- mean
row name in
descr()- sd.long
row name in
descr()- sd
cell content (dfSummary)
- min
row name in
descr()- q1
row name in
descr()- 1st quartile- med
row name in
descr()- q3
row name in
descr()- 3rd quartile- max
row name in
descr()- mad
row name in
descr()- Median Absolute Deviation- iqr
row name in
descr()- Inter-Quartile Range- cv
row name in
descr()- Coefficient of Variation- skewness
row name in
descr()- se.skewness
row name in
descr()- Std. Error for Skewness- kurtosis
row name in
descr()- n.valid
row name in
descr()- Count of non-missing values- pct.valid
row name in
descr()- pct. of non-missing values- no
column name in
dfSummary()- position of column in the data frame- stats.values
column name in
dfSummary()- freqs.pct.valid
column name in
dfSummary()- graph
column name in
dfSummary()- missing
column name in
dfSummary()- distinct.value
cell content in
dfSummary()- singular form- distinct.values
cell content in
dfSummary()- plural form- all.nas
cell content in
dfSummary()- column has only NAs- all.empty.str
cell content in
dfSummary()- column has only empty strings- all.empty.str.nas
cell content in
dfSummary()- col. has only NAs and empty strings- no.levels.defined
cell content in
dfSummary()- factor has no levels defined- int.sequence
cell content in
dfSummary()- rounded
cell content in
dfSummary()- note appearing in Stats/Values- others
cell content in
dfSummary()- nbr of values not displayed- codes
cell content in
dfSummary()- When UPC codes are detected- mode
cell content in
dfSummary()- mode = most frequent value- med.short
cell content in
dfSummary()- median (shortened term)- start
cell content in
dfSummary()- earliest date for date-type cols- end
cell content in
dfSummary()- latest date for data-type cols- emails
cell content in
dfSummary()- generated.by
footnote content
- version
footnote content
- date.fmt
footnote - date format (see
strptime)
Note
Setting a keyword starting with “title.” to NA or to empty string causes the main title to disappear altogether, which might be desired in some circumstances (when generating a table of contents, for instance).
Examples
## Not run:
define_keywords(n = "Nb. Obs.")
## End(Not run)