Quanteda语料库在在WSL2上运行时出错 – 摘要函数

huangapple go评论73阅读模式
英文:

Quanteda Corpus error while running Ubuntu on WSL2 - Summary function

问题

quanteda::data_corpus_inaugural %>% summary()

`在使用 summary 函数时,为什么会出现这个错误呢:

Error in if (...length() && any(...names() == "Dimnames")) .Object@Dimnames <- fixupDN(.Object@Dimnames) : missing value where TRUE/FALSE needed`

我在尝试构建 DFM 时也遇到了错误,但我相信上面的错误更容易复现。tokencorpus 函数似乎正常工作。

可能是我的环境有问题,但我弄不清楚具体是什么。我在 Ubuntu 22.04.2 LTS (Jammy Jellyfish) 下运行,这是在 Win11WSL 2 中。甚至在 RStudio 外面尝试也会得到相同的错误。

$ cat /etc/os-release

PRETTY_NAME="Ubuntu 22.04.2 LTS"

NAME="Ubuntu"

VERSION_ID="22.04"

VERSION="22.04.2 LTS (Jammy Jellyfish)"

VERSION_CODENAME=jammy

ID=ubuntu

ID_LIKE=debian

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

UBUNTU_CODENAME=jammy

  • R 版本:4.1.2

  • 包:Quanteda 3.2.4 , Matrix 1.5-4

有什么想法吗?

英文:

Any idea why I'm getting this error while using summary function:

quanteda::data_corpus_inaugural %&gt;% summary()

Error in if (...length() &amp;&amp; any(...names() == &quot;Dimnames&quot;)) .Object@Dimnames &lt;- fixupDN(.Object@Dimnames) : missing value where TRUE/FALSE needed

I'm also getting error while trying to build a DFM, but I believe the one above is simpler to reproduce. The token and corpus functions seems to be working normaly.

It might be something with my env, but can't figure out what is it. I'm running Ubuntu under Win11 (WSL 2). Tried even outside RStudio and got same error.

$ cat /etc/os-release

PRETTY_NAME="Ubuntu 22.04.2 LTS"

NAME="Ubuntu"

VERSION_ID="22.04"

VERSION="22.04.2 LTS (Jammy Jellyfish)"

VERSION_CODENAME=jammy

ID=ubuntu

ID_LIKE=debian

HOME_URL="https://www.ubuntu.com/"

SUPPORT_URL="https://help.ubuntu.com/"

BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"

PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"

UBUNTU_CODENAME=jammy

  • R version : 4.1.2

  • Packages: Quanteda 3.2.4 , Matrix 1.5-4

Any thoughts?

答案1

得分: 0

升级了 R4.2.3quanteda3.3.0,一切又正常运行了。感谢大家!

英文:

As @ken-benoit mentioned, upgraded R to 4.2.3, quanteda to 3.3.0 and all is running again. Thanks all!

答案2

得分: 0

同样对我来说。我升级了R(我没有在R Studio中做任何事情)。
现在没问题了。

(注意:我没有在R Studio中做任何事情。我删除了R并重新安装了最新版本)。

英文:

Same for me. I updated R (I did not do any thing in R studio).
Now it is OK

(NOTE: I did not do any thing in R studio. I removed R and re installed newest version).

huangapple
  • 本文由 发表于 2023年4月7日 05:40:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/75953977.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定