I have a dataframe IRC_DF and I would like to create an iterator over input objects to vocabularies, for this I try to do like this :
it_train <- itoken(IRC_DF$Raison.Reco, preprocessor = prep_fun,
tokenizer = tok_fun, ids = IRC_DF$ID, progressbar = FALSE)
But I get this error :
Error in UseMethod("itoken") :
no applicable method for 'itoken' applied to an object of class "factor"
Any idea please?
itokenactually expecting? - Roman Luštrikitokenand write down what classes it expects as input. Then go through each input, check class and confirm that it matches the demanded class. - Roman Luštrik