p.df <- wfdf(DATA$state, DATA$person)
p.mat <- wfm(text.var = DATA$state, grouping.var = DATA$person)
kullback.leibler(p.mat)
(x <- kullback.leibler(p.df))
print(x, digits = 5)
kullback.leibler(p.df$greg, p.df$sam)
## p.df2 <- wfdf(raj$dialogue, raj$person)
## x <- kullback.leibler(p.df2)
Run the code above in your browser using DataLab