library('TextRegression')
text <- c('saying text is good',
'saying text once and saying text twice is better',
'saying text text text is best',
'saying text once is still ok',
'not saying it at all is bad',
'because text is a good thing',
'we all like text',
'even though sometimes it is missing')
y <- c(1, 2, 3, 1, 0, 1, 1, 0)
results <- regress.text(text, y)
print(results)
Run the code above in your browser using DataLab