Using the qdap::polarity() function can sometimes run into the error:
Error in derive_pubkey(key) : RAW() can only be applied to a 'raw', not a 'list'
I'm fairly certain this is due qdap's key class conflicting with the openssl package's key class (since derive_pubkey() from openssl is referenced in the error msg).
The error happens when openssl appears in the loaded via a namespace (and not attached): section of sessionInfo(), and it seems to throw off method dispatch for the key class and cause the error.
I've only been able to fix the error by restarting my R session. Is there a way to remove openssl's footprint from the session to fix this issue? Or is there another way to avoid this issue without restarting R?
recreation of error
> successful <- qdap::polarity("testing")
> load_openssl_ns <- body(openssl:::print.key)
> fails <- qdap::polarity("testing")
Error in derive_pubkey(key) :
RAW() can only be applied to a 'raw', not a 'list'