# NOT RUN {
df <- createDataFrame(iris)
ldf <- dapplyCollect(df, function(x) { x })
# filter and add a column
df <- createDataFrame(
list(list(1L, 1, "1"), list(2L, 2, "2"), list(3L, 3, "3")),
c("a", "b", "c"))
ldf <- dapplyCollect(
df,
function(x) {
y <- x[x[1] > 1, ]
y <- cbind(y, y[1] + 1L)
})
# the result
# a b c d
# 2 2 2 3
# 3 3 3 4
# }
Run the code above in your browser using DataLab