EntropySentiment calculate entropy shannon for all sentiment of get_nrc_sentiment in the library syuzhet and return a value for each row import function with source("EntropySentiment.R") Hsent<-entropySent(data_sent) with data_sent get from get_nrc_sentiment