shorten_colnames | R Documentation |
This is useful for DTA export since Stata has a built-in variable name length limit of 32 characters (see also here).
shorten_colnames(x, max_n_char = 32L)
x |
A tabular data object like a data frame or tibble. |
max_n_char |
Maximum allowed number of characters. It is ensured that the maximum resulting variable name length doesn't exceed this limit. Has no
influence on the applied shortening logic. An integerish scalar or |
x
with column names shortened to a maximum length of 32 characters.
Other variable name shortening functions:
restore_colnames()
,
shorten_var_names()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.