fxtract icon indicating copy to clipboard operation
fxtract copied to clipboard

List column as return value

Open schalkdaniel opened this issue 6 years ago • 0 comments

Is it possible to have a list as element of the result? This does not work for me:

library(fxtract)

iris$id = paste0(iris$Sepal.Length, iris$Species)

aggregate = function(data) {

  a = 10
  # browser()
  return(c(coef = list(a = list(10, "bla", TRUE), b = 100, c = 1000)))
}

xtractor = Xtractor$new("iris_test")
xtractor$add_data(iris, group_by = "id")
xtractor$add_feature(aggregate_iters)
xtractor$calc_features()
xtractor$results

unlink("fxtract_files", recursive = TRUE)

But this may be disabled by dplyr...

schalkdaniel avatar Feb 15 '19 14:02 schalkdaniel