I am trying to create nice graphs (preferably in base-r, but ggplot2 would also be okay) for a PowerPoint presentation in R. By "nice", I mean high resolution and seemingly well embedded.
I am trying to install the "rvg" package for the same and use it in conjunction with "officer" (which has been installed successfully), but I get the following error message:
<stdin>:1:10: fatal error: 'ft2build.h' file not found
#include <ft2build.h>
^
1 error generated.
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because freetype2 was not found. Try installing:
* deb: libfontconfig1-dev (Debian, Ubuntu, etc)
* rpm: fontconfig-devel (Fedora, EPEL)
* csw: fontconfig_dev (Solaris)
* brew: freetype (OSX)
If freetype2 is already installed, check that 'pkg-config' is in your
PATH and PKG_CONFIG_PATH contains a freetype2.pc file. If pkg-config
is unavailable you can set INCLUDE_DIR and LIB_DIR manually via:
R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'
--------------------------------------------------------------------
ERROR: configuration failed for package ‘systemfonts’
* removing ‘/Users/raghavtalwar/Library/R/3.3/library/systemfonts’
Warning in install.packages :
installation of package ‘systemfonts’ had non-zero exit status
ERROR: dependency ‘systemfonts’ is not available for package ‘gdtools’
* removing ‘/Users/raghavtalwar/Library/R/3.3/library/gdtools’
Warning in install.packages :
installation of package ‘gdtools’ had non-zero exit status
ERROR: dependency ‘gdtools’ is not available for package ‘rvg’
* removing ‘/Users/raghavtalwar/Library/R/3.3/library/rvg’
Warning in install.packages :
installation of package ‘rvg’ had non-zero exit status
Consequently, even though I have given permission for R to install dependencies (such as gdtools), I cannot use this package. Is there a way I can correct the error? Or can I use another package? I'm using R version 3.3 on a Mac (OS X Yosemite).
Update: I cannot download rvg at all, despite the suggestions below, is there a good alternative?