执行暂停 - 没有名为'rgeolocate'的包[R]

时间:2018-02-27 00:11:02

标签: r packages

自从我执行以下操作后,我无法以PDF格式编写文档:

setme <- 
"Sys.setenv(TZ='America/New_York') #some default not get any errors
invisible(loadNamespace('rgeolocate'))
invisible(loadNamespace('httr'))
mytz <- rgeolocate::ip_api(httr::content(httr::GET('https://api.ipify.org?format=json'))[1])[['timezone']]
Sys.setenv(TZ=mytz)"

cat(setme,file=file.path(R.home(),'etc/Rprofile.site'),sep='\n')

来自:https://community.rstudio.com/t/rstudio-sys-setenv-does-not-persist/2105/16

在R Markdown中,它会输出以下信息:

Error in loadNamespace("rgeolocate") : 
  there is no package called ‘rgeolocate’
Execution halted
  

你知道这样的消息是什么原因吗?

     

我很遗憾地执行了这些行。谢谢

0 个答案:

没有答案