![]() See Examples.Ĭlean_factor(): Use parameter levels to set new factor levels. Use parameter na to override values as NA that would else be matched with true or false. This allows support for values "Yes" and "No" in the following languages: Arabic, Bengali, Chinese (Mandarin), Dutch, English, French, German, Hindi, Indonesian, Japanese, Malay, Portuguese, Russian, Spanish, Telugu, Turkish and Urdu. At default, values are matched with regex_true and regex_false. Using clean() on a ame to apply this guessed cleaning over all columns.Ĭlean_logical(): Use parameters true and false to match values using case-insensitive regular expressions (regex). ![]() Using clean() on a vector will guess a cleaning function based on the potential number of NAs it returns. Treated as UTC, on some platforms with a warning. System-specific (see time zones),īut "" is the current time zone, and "GMT" is UTC Time zone specification to be used for the conversion, This is to prevent that clean_Date("23-03-47") will return 23 March 2047 and instead returns 23 March 1947 with a warning.įor clean_Date and clean_POSIXct: other parameters passed on these functions Logical to indicate whether all items of x should be guessed one by one, see Examplesĭate to indicate to maximum allowed of x, which defaults to today. The currency symbol to use, which will be guessed based on the input and otherwise defaults to the current system locale setting (see Sys.localeconv)Ĭharacter string giving a date-time format as used by strptime.įor clean_Date(., guess_each = TRUE), this can be a vector of values to be used for guessing, see Examples. Logical to indicate whether the result should be trimmed with trimws(., which = "both") Regex to define the character(s) that should be removed, see Details Logical to indicate whether non-existing factor levels should be dropped Logical to indicate whether the factor levels should be ordered New factor levels, may be named with regular expressions to match existing values, see Details Logical to indicate whether matching should be case-insensitive Logical to indicate whether regular expressions should be turned off Regex to force interpret values as NA, i.e. Regex to interpret values as FALSE (which defaults to regex_false), see Details Regex to interpret values as TRUE (which defaults to regex_true), see Details ) clean_POSIXct ( x, tz = "", remove = "", fixed = FALSE, max_date = Sys.Date (). Clean ( x ) # S3 method for class 'ame' clean ( x ) clean_logical ( x, true = regex_true (), false = regex_false (), na = NULL, fixed = FALSE, ignore.case = TRUE ) clean_factor ( x, levels = unique ( x ), ordered = FALSE, droplevels = FALSE, fixed = FALSE, ignore.case = TRUE ) clean_numeric ( x, remove = "", fixed = FALSE ) clean_double ( x, remove = "", fixed = FALSE ) clean_integer ( x, remove = "", fixed = FALSE ) clean_character ( x, remove = "", fixed = FALSE, ignore.case = TRUE, trim = TRUE ) clean_currency ( x, currency_symbol = NULL, remove = "", fixed = FALSE ) clean_percentage ( x, remove = "", fixed = FALSE ) clean_Date ( x, format = NULL, guess_each = FALSE, max_date = Sys.Date ().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |