# NOT RUN {
set.seed(10)
dfmat <- dfm(c("a b c c d", "a a c c d d d"))
head(dfmat)
head(dfm_sample(dfmat))
head(dfm_sample(dfmat, replace = TRUE))
head(dfm_sample(dfmat, margin = "features"))
head(dfm_sample(dfmat, margin = "features", replace = TRUE))
# }
Run the code above in your browser using DataLab