在 R 中,每次点击时都会出现以下错误View()
or data.frame
我不明白为什么。事情发生得很突然。
> View(Fhat_all)
Error in .External2(C_dataviewer, x, title) : unable to start data viewer
In addition: Warning message:
In View(Fhat_all) : unable to open display
> da <- data.frame(comb[true_comb_RMSE[1],1], comb[true_comb_RMSE[1],2],
comb[true_comb_KS[1],1],comb[true_comb_KS[1],2])
Error in (function (env, objName) :
could not find function "object.size"
我检查了 Stackoverflow 中的其他页面无法使用 View() 或 edit() 函数,收到“Error in .External2(C_dataviewer, x, title) : invalid device”错误消息 https://stackoverflow.com/questions/19009308/cant-use-either-view-or-edit-functions-getting-error-in-external2c-data但我不明白如何解决它。所以我打了locale
在终端上得到这个结果:
Last login: Mon Mar 21 16:47:07 on ttys000
MacBook-Pro:~ "username"$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
MacBook-Pro:~ "username"$ LC_CTYPE = C R
-bash: LC_CTYPE: command not found
所以我打了LC_CTYPE=C R
按照建议在终端上尝试查看向量R
,但我收到了相同的错误消息:
> View(w)
Error in .External2(C_dataviewer, x, title) : unable to start data viewer
In addition: Warning message:
In View(w) : unable to open display
你能帮我么?谢谢。