inst/benchmarks/bench-support.R

library(FSelectorRcpp)
library(microbenchmark)

x <- round(rnorm(10000), 3)

microbenchmark(length(unique(x)), fs_count_levels(x))

x <- as.character(x)
microbenchmark(length(unique(x)), fs_count_levels(x))


microbenchmark(length(levels(factor(x))), fs_count_levels(x))

Try the FSelectorRcpp package in your browser

Any scripts or data that you put into this service are public.

FSelectorRcpp documentation built on April 28, 2023, 5:07 p.m.