[英]How to use a list name in the name of the figure?
我創建了幾個列表環境。 然后,我編寫了一個函數,用於從存儲的數據中繪制多個圖形,並且我想使用列表名稱作為圖形名稱的一部分。
list_xName <- list(aa = 1:10, bb = exp(-3:6), cc=-3:6)
drawL<-function(list_xName){
plot(list_xName$aa,list_xName$bb)
savePlot(filename=paste("fig_",xxxxxxx,sep=""),type="eps")
}
我想使用列表的名稱代替savePlot中的“ xxxxxxx”。
我希望我的問題是可以理解的。 先感謝您。
嘗試deparse(substitute(list_xName))
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.