r - set default filter in gfile open dialog -
i using gwidgets2tcltk
produce simple gfile()
open dialog filter=
select csv files.
how can make csv filter default filter?
this almost want:
library(gwidgets2tcltk) # v. 1.0.5 library(gwidgets2) # v. 1.0.7 gfile(text='select csv input', type='open', initial.filename = null, initial.dir='d:/workspace/folder', toolkit=guitoolkit(name='tcltk'), filter=c('csv'='csv') )
the issue csv filter not selected default -- has selected user via drop-down.
the documentation under ?gfile
sparse. literally:
a filter specifiation. can named character vector of file extensions or toolkit specific. here examples:
- characterc("csv"="csv","txt"="txt")
rgtk2 list("all files" = list(patterns = c("")), "r files" = list(patterns = c(".r", "*.rdata")), "text files" = list(mime.types = c("text/plain")) )
tcltk
- qt
i'm on r 3.3.1 on windows 7.
Comments
Post a Comment