Package (rworldmap) can not be loaded in R software

你。 提交于 2020-01-06 12:53:08

问题


When I load the rworldmap package, it can not be loaded in R software (version: 3.0.3).

The rworldmap package has been installed.
Code: library(rworldmap)

Wrong information appeared on the window as follows:

" Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called ‘fields’
Error: package or namespace load failed for ‘rworldmap’ "

How to tackle it? Thanks for your attention.


回答1:


Try this in R studio where Dependent packages are automatically get installed .

In base R you Want this packages package ‘spam’ successfully unpacked and MD5 sums checked package ‘fields’ successfully unpacked and MD5 sums checked package ‘rworldmap’ successfully unpacked and MD5 sums checked




回答2:


Try this

Install package map 
library("ggmap")
library(maptools)
library(maps)
map("world", fill=TRUE, col="white", bg="lightblue", ylim=c(-60, 90), mar=c(0,0,0,0))


来源:https://stackoverflow.com/questions/22817002/package-rworldmap-can-not-be-loaded-in-r-software

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!