fix.data | R Documentation |
This function applies several data cleaning functions from the fixr
package to a given data frame. The fix_data_names
, remove_spaces
, remove_symbols_data
, and replace_blanks_with_na
functions are used to add "X_" before column and row names that start with a number, remove leading/trailing spaces, remove non-alphanumeric characters from the data, replace spaces with underscores in column and row names, and replace empty string values with NAs, respectively.
fix.data(df)
df |
A data frame to be processed. |
The cleaned data frame.
df <- data.frame(" 1st col " = c("", "foo", ""), "2nd col" = c(" ", " ", "bar"),
"3rd col" = c(1, 2, 3))
fix.data(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.