I am currently looking for someone who would be interested in becoming the official maintainer of the package. Advanced skill in R or previous package development experience is not necessary. I will be able to help out with code review, etc. Please comment on this issue if you are interested.
cattonum (“cat to num”) provides different ways to encode categorical features as numerics. Its goal is to be a one-stop shop for all categorical encoding needs. It includes the following:
catto_aggregate()
catto_dummy()
catto_freq()
catto_label()
catto_loo()
catto_mean()
catto_median()
catto_onehot()
There are many existing packages with which to encode categorical features, including (among others):
The development version can be installed from the develop
branch on GitHub, which is the default branch.
The latest official release can be installed from CRAN.
library(cattonum)
data(iris)
head(catto_loo(iris, response = Sepal.Length))
#> # A cattonum_df with the following data:
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.2 5.004082
#> 2 4.9 3.0 1.4 0.2 5.008163
#> 3 4.7 3.2 1.3 0.2 5.012245
#> 4 4.6 3.1 1.5 0.2 5.014286
#> 5 5.0 3.6 1.4 0.2 5.006122
#> 6 5.4 3.9 1.7 0.4 4.997959
Please note that this project is released with a Contributor Code of Conduct. By contributing, you agree to abide by its terms.