Sparklyr: how to center a Spark table based on column?
[*] You just use mutate_each / muate_all library(dplyr) df <- data.frame(x=c(1, 2, 3), y = c(-4, 5, 6), z = c(42, 42, 42)) sdf <- copy_to(sc, df, overwrite=TRUE) mutate_all(sdf, funs(. – mean(.))) Source: query [3 x 3] Database: spark connection master=local[*] app=sparklyr local=TRUE x y z <dbl> <dbl> <dbl> 1 -1 -6.333333 0 2 0 … Read more