1

I'm familiarizing myself with the qdap package in R, and am trying to re-run some of the example code in the package vignette, but I keep running into issues. When I run the following code, I get the error message:

Error in derive_pubkey(key) : RAW() can only be applied to a 'raw', not a 'list'

Here is my code, which shows all the other libraries I have installed:

library(tidytext) 
library(textdata) 
library(coreNLP)
library(cleanNLP)
library(sentimentr)
library(scales)
library(igraph)
library(ggraph)
library(widyr)
library(qdap)

synonyms(c("the", "cat", "teach"))

The last line is straight out of the vignette, so I'm wondering if I've missed something in the package installation? Other commands have been working just fine.

Edit: here's a summary of the output when I call traceback() after getting the error:

> traceback()
12: derive_pubkey(key)
11: as.list.key(x)
10: as.list(x)
9: names.key(xi)
8: names(xi)
7: paste0(prefix, names(xi)[j])
6: as.data.table.list(x, keep.rownames = keep.rownames, check.names = check.names, 
       .named = nd$.named)
5: data.table::data.table(data.table::copy(key))
4: hash_lookup_helper(terms, key, missing)
3: hash_look(terms = terms, key = key)
2: terms %hlqdap% synonym.frame
1: synonyms(c("the", "cat", "teach"))
Ardyn
  • 125
  • 2
  • 7
  • 1
    Can you post the results of `traceback()` after you get the error so we can see exactly where the error is coming from? – MrFlick Jul 13 '23 at 19:05

0 Answers0