is this equivalent to Dictionary() in R? -
i following book machine learning in r , got following code:
sms_train<-apply(sms_train,margin=2,convert_counts) sms_dtm_train <- sms_dtm[1:4169, ]
and in book says:
to save list of frequent terms use later, we'll use dictionary() function:
sms_dict <- dictionary(findfreqterms(sms_dtm_train, 5))
but problem new tm() library not have dictionary() function included in new version. know if line equivalent:
sms_dict<-findfreqterms(sms_dtm_train,5)
thanks below comment here, found can use terms() function like:
sms_dict<-terms(sms_dtm_train)
the main problem cannot use findfreqterms(sms_dtm_train,5), program not work correctly.
any help?
Comments
Post a Comment