tk_choose.files package:tcltk R Documentation _C_h_o_o_s_e _a _L_i_s_t _o_f _F_i_l_e_s _I_n_t_e_r_a_c_t_i_v_e_l_y _D_e_s_c_r_i_p_t_i_o_n: Use a Tk file dialog to choose a list of zero or more files interactively. _U_s_a_g_e: tk_choose.files(default = "", caption = "Select files", multi = TRUE, filters = NULL, index = 1) _A_r_g_u_m_e_n_t_s: default: which filename to show initially. caption: the caption on the file selection dialog. multi: whether to allow multiple files to be selected. filters: two-column character matrix of filename filters. index: unused. _D_e_t_a_i_l_s: Unlike 'file.choose', 'tk_choose.files' will always attempt to return a character vector giving a list of files. If the user cancels the dialog, then zero files are returned, whereas 'file.choose' would signal an error. The format of 'filters' can be seen from the example. File patterns are specified via extensions, with '"*"' meaning any file, and '""' any file without an extension (a filename not containing a period). (Other forms may work on specific platforms.) Note that the way to have multiple extensions for one file type is to have multiple rows with the same name in the first column, and that whether the extensions are named in file chooser widget is platform-specific. *The format may change before release.* _V_a_l_u_e: A character vector giving zero or more file paths. _S_e_e _A_l_s_o: 'file.choose', 'tk_choose.dir' _E_x_a_m_p_l_e_s: Filters <- matrix(c("R code", ".R", "R code", ".s", "Text", ".txt", "All files", "*"), 4, 2, byrow = TRUE) Filters if(interactive()) tk_choose.files(filter = Filters)