を解凍した後、 『create_matrix「エラーの機能を見つけることができませんでした』:!:TMパッケージには、私はRでこのコードを実行しようとすると、私は問題を抱えている
library(RTextTools)
library(e1071)
pos_tweets = rbind(
c('I love this car', 'positive'),
c('This view is amazing', 'positive'),
c('I feel great this morning', 'positive'),
c('I am so excited about the concert', 'positive'),
c('He is my best friend', 'positive')
)
neg_tweets = rbind(
c('I do not like this car', 'negative'),
c('This view is horrible', 'negative'),
c('I feel tired this morning', 'negative'),
c('I am not looking forward to the concert', 'negative'),
c('He is my enemy', 'negative')
)
test_tweets = rbind(
c('feel happy this morning', 'positive'),
c('larry friend', 'positive'),
c('not like that man', 'negative'),
c('house not great', 'negative'),
c('your song annoying', 'negative')
)
tweets = rbind(pos_tweets, neg_tweets, test_tweets)
# build dtm
matrix= create_matrix(tweets[,1], language="english",
removeStopwords=FALSE, removeNumbers=TRUE,
stemWords=FALSE)
が、私はこのエラーを取得する
"Error: could not find function "create_matrix
私はパッケージをインストールする前に、コードは、うまく働いたが、私は、TMパッケージをインストールしたとき、私は今、このエラーが発生します。
任意のアイデアをしてください?
をインストールする必要があります。たとえば、 'pos_tweets'を' cbind(c( '私はこの車が大好きです'、 'This view is amazing'、...)、 'positive ')'と定義します。 –
@KonradRudolphあなたは深刻ですか?私のコードが明確でないことがわかりましたか?奇妙な答え – Datackatlon
いいえ、それはかなり明確です。しかし、それはさらに明確になる可能性があります:まだ多くの繰り返しがあります。値そのものだけでなく、その周囲の文法的なノイズ( 'c(...)'を繰り返す)。 –