Click here on how to use the R6 class Xtractor.

unlink("fxtract_files", recursive = TRUE)
library(fxtract)
xtractor = Xtractor$new("xtractor")
xtractor$add_data(iris, group_by = "Species")

fun1 = function(data) {
  c(mean_sepal_length = mean(data$Sepal.Length),
    sd_sepal_length = sd(data$Sepal.Length))
}

fun2 = function(data) {
  c(mean_petal_length = mean(data$Petal.Length),
    sd_petal_length = sd(data$Petal.Length))
}

xtractor$add_feature(fun1)
xtractor$add_feature(fun2)
xtractor$calc_features()


Try the fxtract package in your browser

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

fxtract documentation built on July 8, 2020, 5:43 p.m.