Gggart的qart在采購時不執(zhí)行假設我有兩個源文件,第一個名為example1.r第二個example2.r(見下文)。示例1.rplot(1:10,1:10)例2.rqplot(1:10,1:10)當我源例1.r時,就畫出了圖。然而,當我引用實例2.r時,它就沒有了。這里的解決方案是什么?(例2.r為gggplot 2函數(shù))
2 回答

拉風的咖菲貓
TA貢獻1995條經(jīng)驗 獲得超2個贊
更新:
.R檔案:
source
選擇 print.eval=TRUE
將導致在交互命令行中打印評估結(jié)果的行為。
source("Script.R", print.eval=TRUE)
.RnW檔案:
knitr
默認情況下,模擬交互式命令行WRT的行為。 print
英。請注意 knitr
可指定為甜引擎,也可用于R包小插畫。
print (qplot (1 : 10, 1 : 10))
qplot
qplot <- function (x, y = NULL, z = NULL, ...) { p <- ggplot2::qplot (x = x, y = y, z = z, ...) print (p)}

開滿天機
TA貢獻1786條經(jīng)驗 獲得超13個贊
source
knitr
Sweave
knitr
print
- 2 回答
- 0 關注
- 541 瀏覽
添加回答
舉報
0/150
提交
取消