我目前在Windows上运行R版本3.4.2并且有ggplot2(通过tidyverse)和sf包版本3.4.2.我正在尝试使用ggplot2 sf工具包映射空间数据.
尝试运行geom_sf时,收到错误:could not find function "geom_sf".
当我使用ggplot2包搜索时ls("package:ggplot2"),geom_sf未列在库文件中.
我安装了devtools并跑了devtools::install_github("tidyverse/ggplot2").但是,我收到一个错误:Installation failed: Failed to connect to raw.githubusercontent.come port 443: Timed out.我认为工作中的防火墙正在停止此连接.
为了解决这个问题,我尝试从https://github.com/tidyverse/ggplot2手动下载zip 并运行install.packages('ggplot2-master.zip', lib = 'C:/filepath')并收到错误:package 'ggplot2-master.zip' is not available (for R version 3.4.2).在我从3.4.1更新之前,我遇到了同样的错误.
TLDR:我遇到与此用户相同的问题:绘制sf对象时出错---错误:无法找到函数"geom_sf" 但解决方案对我不起作用.
有谁看到我可能遗失的东西?或者如何访问这个高度引用(更简化)的包?
我正在尝试从其存储库安装dplyr,但是我收到以下错误.我正在使用MBP与Yosemite和Xcode 6.2(它有点过时).我发现这很好奇,显然,这不是一个常见问题,因为我没有在此错误消息上找到任何线程.我想知道我在这里缺少什么构建工具.
> devtools::install_github("hadley/dplyr")
Downloading GitHub repo hadley/dplyr@master
from URL https://api.github.com/repos/hadley/dplyr/zipball/master
Error: Could not find build tools necessary to build dplyr
Run Code Online (Sandbox Code Playgroud)
当我尝试从本地安装源包时,这是我从终端收到的错误:
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -DPLATFORM_PKGTYPE='"mac.binary.mavericks"' -fPIC -Wall -mtune=core2 -g -O2 -c pause.c -o pause.o
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/opt/X11/lib -L/usr/local/lib /usr/local/lib/libcairo.a /usr/local/lib/libpixman-1.a /usr/local/lib/libfreetype.a /usr/local/lib/libfontconfig.a -lxml2 /usr/local/lib/libreadline.a -o profvis.so pause.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
clang: error: no such file or directory: '/usr/local/lib/libreadline.a'
Run Code Online (Sandbox Code Playgroud)