简体   繁体   English

在 R 的 google colab 中,如何安装 crimedata package?

[英]In google colab for R, how to install crimedata package?

I usually have no issues with installing packages in google colab for R, but I can't figure out how to fix the issues I'm having (non zero exit status).我通常在 R 的 google colab 中安装软件包没有问题,但我不知道如何解决我遇到的问题(非零退出状态)。

install.packages("crimedata")

outputs产出

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)

also installing the dependencies ‘s2’, ‘units’, ‘sf’


Warning message in install.packages("crimedata"):
“installation of package ‘s2’ had non-zero exit status”
Warning message in install.packages("crimedata"):
“installation of package ‘units’ had non-zero exit status”
 Warning message in install.packages("crimedata"):
“installation of package ‘sf’ had non-zero exit status”
Warning message in install.packages("crimedata"):

and so on...等等...

when I try to import it from github, the same issue happens:当我尝试从 github 导入它时,同样的问题发生了:

install.packages("devtools")
devtools::install_github("mpjashby/crimedata")

outputs产出

Warning message in install.packages("devtools"):
“installation of package ‘textshaping’ had non-zero exit status”

and so on.等等。

alternatively... if anyone would be able to point me to anywhere online where I can find all the data in this package in a CSV, that would also solve my problem.或者...如果有人能够将我指向在线的任何地方,我可以在 CSV 中找到此 package 中的所有数据,那也可以解决我的问题。

Do this at the beginning.一开始就这样做。

system("sudo apt install libudunits2-dev")

Then install the crimedata package.然后安装crimedata package。

install.packages("crimedata", verbose=T, keep_outputs=T)

The verbose and keep_outputs create detailed output that is invaluable for debugging and which is stored in the /content folder. verbosekeep_outputs创建了详细的 output,它对调试非常有用,存储在/content文件夹中。 Ignore these options if you don't need the details.如果您不需要详细信息,请忽略这些选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM