# NOT RUN {
# for a document-feature matrix
dfmat <- dfm(c("b A A", "C C a b B"), tolower = FALSE)
dfmat
dfm_tolower(dfmat)
dfm_toupper(dfmat)
# for a feature co-occurrence matrix
fcmat <- fcm(tokens(c("b A A d", "C C a b B e")),
context = "document")
fcmat
fcm_tolower(fcmat)
fcm_toupper(fcmat)
# }
Run the code above in your browser using DataLab