Fix for latest R-devel, that does not allow digits = 0
for format()
clean_Date()
now supports month-year format for which it sets the day as 1:
freq()
now contains a wt
argument to set the weights. The default (NULL
) yields the old behaviour.
Fixed a bug in clean_POSIXct()
that led to the warning Incompatible methods ("Ops.POSIXt", "Ops.Date") for ">"
New function format_p_value()
to format raw p values according to the APA guideline
clean_Date()
now works with POSIX standards:
Currency now prints and formats without symbols as default, use as_symbol = TRUE
to print/format with currency symbols
Support for older versions of R (v3.2)
New function format_names()
to quickly and easily change names of data.frame
columns, list
s or character
vectors.
df <- data.frame(old.name = "test1", value = "test2")
format_names(df, snake_case = TRUE)
format_names(df, camelCase = TRUE)
format_names(df, c(old.name = "new_name", value = "measurement"))
library(dplyr)
starwars %>%
format_names(camelCase = TRUE) %>% # column names
mutate(name = name %>%
format_names(snake_case = TRUE)) # values in column
New generic function na_replace()
to replace NA
values in any data type. Its default replacement value is dependent on the data type that is given as input: 0
for numeric values and class matrix
, FALSE
for class logical
, today for class Date
, and ""
otherwise.
Support for the upcoming R 4.1.0
New function rdate()
to generate random dates (in analogy to e.g. runif()
)
Frequency tables (freq()
):
Added availability of data to header
Fix for using na.rm
Fix for transforming to a visual histogram with hist()
New method for using format()
on a frequency table
New method for transforming the values of a frequency table to a vector with as.vector()
, which also supports dates
Fix for clean_Date()
not accepting already POSIX
or Date
input
When using clean_Date(..., guess_each = TRUE)
it now accepts the format
parameter as a vector of options to let it choose from
clean_Date()
and clean_POSIXct
gained a parameter max_date
(that defaults to today), so that they will never return years beyond a specified date:
Cleaned all code using the lintr
package
percentage
class into the percentage()
function, i.e. percentage(as.percentage(1))
would failas.percentage(2.5e-14)
clean_double()
and clean_integer()
median()
in percentagesNA
in percentages would not be formatted correctlycleaner
as.percentage()
and clean_percentage()
. They also come with ‘S3 methods’ for print
, format
, sum
, min
and max
.clean_numeric()
, clean_percentage()
and clean_currency()
clean_character()
on R v3.5 and loweras.currency()
and clean_currency()
. They also come with ‘S3 methods’ for print
, format
, sum
, min
and max
.clean_POSIXct()
to clean date/time objectstop_freq()
now correctly selects bottoms items using negative a number for nfreq.default()
is now exported for use in other packagesstats::quantile()
)clean_character()
, it also keeps in-between spaces nowclean_numeric()
now supports currencyfreq()
where the precentage of NAs in the header was not calculated right