Description Usage Arguments Value Examples
When reading in a flat file (csv, txt, etc) that was converted from an Excel spreadsheet,
column names often have spaces between words. R reads these spaces as periods. If there are multiple spaces or special characters that
are not valid in column names, R replaces with a period. When the data is messy, you sometimes get several consecutive periods
or traling periods at the end of column names. I use this function as a coarse tool to standardize this ugliness
Periods can then be easily replaced (gsub
'ed) with a single character if periods aren't your thing.
1 |
df |
input data.frame to be aggregated |
vector of strings without duplicate periods
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.