### R代码来自Vignette Source'tkwidgets.rnw'########################################################### ###代码块编号1:tkwidgets.rnw:55-87 ############################################################(1))argsfun <-function(){argswidget(list(entry1 =“ aaaaa”,ehtry2 =“ bbbb”))} button1} button1 < - button(wname =“ button1”,wvalue =“ argswidget”command = argsfun),wenv = pwenv)button2 <-button(wname =“ button2”,wvalue =“ dpexplorer”,wfuns = list = list(command = dpexplorer),wenv = pwenv)wvalue =“ fileBrowser”,wfuns = list(命令= fileBrowser),wenv = pwenv)button4 <-batter(wname =“ button4”,wvalue =“ importwizard”,wfuns = list = list = command = importwizard),wenv = pwenv = pwenv = pwenv)button5<-button(wname =“ button5”,wvalue =“ objectBrowser”,wfuns = list(command = objectBrowser),wenv = pwenv)button6 button6 < - button(wname =“ button6”,wvalue =“ wvalue =“ vexplorer”命令= vexplorer),wenv = pwenv)button7 <-button(wname =“ button7”,wvalue =“ pexplorer”,wfuns = list(command = pexplorer),wenv = pwenv)fun <-function <-function <-function <-function(){eexplorer(eexplorer)<-button(wname =“ button8”,wvalue =“ eexplorer”,wfuns = list(command = fun),wenv = pwenv)pwidgets <-list < - list(a = list1 = button1 = button1,button2 = button2),c = list,(button 3 = button3,button4 = button4),d = list(button5 = button5,button6 = button6),e = list(button7 = button7,button8 = button8))if(interactive(interactive()){viewWidget(witchwidget(wtitle)(wtitle = wtitle = wtitle = wtitle =“ tkwidgets示例”,pwidgets,funs = list(),prefun = function()print(“ hello”),postfun = function()print(“ bye”),env = pwenv)} #########################################:tkwidgets.rnw:244-245 #######################