Cannot library rvg package

Hi all,

Recently, I need rvg package to publish powerpoint slides directly by R. However, I cannot library rvg package because of this following error. I am using Mac with OS High Sierra but my friend with Windows does not have this error while having the same code. Can anyone help me with this problem?

Error: package or namespace load failed for ‘rvg’ in dyn.load(file, DLLpath = DLLpath, …): unable to load shared object ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so’:dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so, 6): Library not loaded: /opt/X11/lib/libcairo.2.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/gdtools/libs/gdtools.so
Reason: image not found

Thanks a lot for your question. Since it is not related to MXNet, it is better if you ask this question in a different forum or open an issue here https://github.com/davidgohel/rvg