fix.data {fixr} | R Documentation |
Fix data frame column and row names and remove symbols and blanks
Description
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.
Usage
fix.data(df)
Arguments
df |
A data frame to be processed. |
Value
The cleaned data frame.
Examples
df <- data.frame(" 1st col " = c("", "foo", ""), "2nd col" = c(" ", " ", "bar"),
"3rd col" = c(1, 2, 3))
fix.data(df)
[Package fixr version 0.1.0 Index]