A (largely untested) function that will take a named vector or a named list and reverse elements/names: the names become the elements, and the elements become the names. This is useful to me because I can never remember the structure of named lists preferred by the custom.coef.map argument in texreg.
1 | reverse_names(veclist, coerce = FALSE)
|
veclist |
a named vector or list. |
coerce |
coerce a list to a vector? silently ignored if veclist is a vector. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.