Получение ошибки «Ошибка в поиске [, 1]: неверное количество измерений» при построении слова сети - PullRequest
0 голосов
/ 15 января 2020

Я пытаюсь построить сеть слов с помощью функции qdap word_associate. Ниже приведен кадр данных и его элементы.

df<-data.frame(text=c("There is a decent section of beach but the buildings adjacent to the beach are under attack from fairly big waves.",
                      "The beach is clean and being close to the reef one can see some fish and sea life. The sea is ideal for surfing.",
                      "A nice clean beach with a few restaurants all having sunbeds, free if you partake in food or drink. Waves can be pretty big at times."),
               author=c("Paul","Mark","Henry"),stringsAsFactors = FALSE)

str(df)

# data.frame':  3 obs. of  2 variables:
#  $ text  : chr  "There is a decent section of beach but the buildings adjacent to the beach are under attack from fairly big waves." "The beach is clean and being close to the reef one can see some fish and sea life. The sea is ideal for surfing." "A nice clean beach with a few restaurants all having sunbeds, free if you partake in food or drink. Waves can b"| __truncated__
#  $ author: chr  "Paul" "Mark" "Henry"

Теперь я пытаюсь запустить функцию word_associate, получаю следующее сообщение об ошибке

word_associate(df$text, match.string = "beach", 
               stopwords = c(Top200Words), 
               network.plot = TRUE, cloud.colors = c("gray85", "darkred"))

# Error in lookup[, 1] : incorrect number of dimensions
...