# NOT RUN {
# dfm subsetting
x <- dfm(tokens(c("this contains lots of stopwords",
"no if, and, or but about it: lots",
"and a third document is it"),
remove_punct = TRUE))
x[1:2, ]
x[1:2, 1:5]
# fcm subsetting
y <- fcm(tokens(c("this contains lots of stopwords",
"no if, and, or but about it: lots"),
remove_punct = TRUE))
y[1:3, ]
y[4:5, 1:5]
# }
Run the code above in your browser using DataLab