我想把ggplot2做的圖片直接保存成ppt,想到了之前的推文 《我不會用illustrator,只會用ppt!》 這裏用到的是 export 包
首選是安裝 ,使用的命令是 install.packages("export")
但是遇到報錯
Warning in install.packages :
package ‘export’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
換成另外的命令安裝
devtools::install_github("tomwenseleers/export")
成功
導出爲ppt用到的命令是
export::graph2ppt(p1,file="Rplot02.ppt",
width=12,
height=4)
遇到報錯
Error in PPTX_(file, bg, width, height, offx = offx, offy = offy, pointsize = pointsize, :
function 'Rcpp_precious_remove' not provided by package 'Rcpp'
查了一下 說直接更新 Rcpp 這個R包
更新R包直接把這個包重新安裝一遍就可以
install.packages("Rcpp")
最終得到了結果
歡迎大家關注我的公衆號
小明的數據分析筆記本
小明的數據分析筆記本 公衆號 主要分享:1、R語言和python做數據分析和數據可視化的簡單小例子;2、園藝植物相關轉錄組學、基因組學、羣體遺傳學文獻閱讀筆記;3、生物信息學入門學習資料及自己的學習筆記!