
最近在學會(http://www.r-software.org/)的台灣 R 軟體使用者論壇上有人提起 attach 指令,讓我想起前一陣子看到的 with 指令。過去我們常用 attach 指令,將資料框物件附加到搜尋路徑(search path)上,使得資料框中的變數對於 R 的直譯器(interpreter)而言是可見的(visible),省去須敲擊資料框全名方能引用變數的麻煩!以 car 套件中的資料框 Duncan 為例,
> library(car)
> head(Duncan)
type income education prestige
accountant prof 62 86 82





