search for: tkchoosedirectory

Displaying 13 results from an estimated 13 matches for "tkchoosedirectory".

2009 Oct 13
1
how to have tkchooseDirectory resize in windows?
R-2.8.0 / tcltk8.5 In windows, Rgui.exe has a directory browser that can be resized, but when I call tkchooseDirectory(), it is a fixed size. In linux, when I call tkchooseDirectory() it can be resized. How do I get a windows version that I can resize? [[alternative HTML version deleted]]
2004 Sep 24
5
using tcltk in R under ESS/XEmacs on Windows
Sorry for the cross-post. Not sure where the problem is... A while back I posted an R function to R-help: cd <- function (dir = tclvalue(tkchooseDirectory()), saveOld = FALSE, loadNew = TRUE) { stopifnot(require(tcltk)) if (saveOld) save.image(compress = TRUE) setwd(dir) rm(list = ls(all = TRUE, envir = .GlobalEnv), envir = .GlobalEnv) if (loadNew && file.exists(".RData")) { loaded <- loa...
2005 Aug 31
1
tcl/tk return problem
...in R and have a problem which will probably sound silly to most of you. Here is the code I have problems with: readcelfiles <- function() { require(tcltk) tt <- tktoplevel() tkgrid(tklabel(tt,text="Choose a directory!")) OnOK <- function() { fileDir<-tclvalue(tkchooseDirectory()) data.raw <- ReadAffy(celfile.path=fileDir) #return(data.raw) } OK.but <- tkbutton(tt,text="OK",command=OnOK) tkgrid(OK.but) tkfocus(tt) } So after clicking on my "OK" button, I choose my directory and read the cel-files. But now I want to return the...
2008 Aug 19
1
Open directory within a menu in tcltk
Hello, I am trying to setup a menu to open files and directories. I have the following code: opendir<-function() { dirname<<-tclvalue(tkchooseDirectory()) } openfile<-function() { filename<<-tclvalue(tkgetOpenFile()) } require(tcltk) t1<-tktoplevel() topMenu<-tkmenu(t1) tkconfigure(t1,menu=topMenu) plotMenu<-tkmenu(topMenu, tearoff=FALSE) tkadd(plotMenu,"command",label="Open file", command=openfile) tkad...
2004 Feb 10
3
how to get the GUI directory chooser on Windows?
Dear R-help, Can anyone tell me if it's possible to call up the "directory chooser" (the one you get when you click on "File" -> "Change Dir...") in Rgui from the R command line? Seems like file.choose() can't be used to choose a directory. This is in R-1.8.1 on WinXPPro. Any help much appreciated! Andy
2005 Aug 15
1
Anything like dir.choose (similar to file.choose) in R?
Does R have a dir.choose function? I can use file.choose like this as a kludge to get something like a dir.choose, but a real dir.choose would be better: cat("Select one of files in directory to process:\n") filename <- gsub("\\\\", "/", file.choose()) basepath <- dirname(filename) Windows provides a lower-level SHBrowseForFolder function to create such
2005 Sep 25
0
Tip: Working directory in titlebar
...have tested this with rterm.exe and rgui.exe under Windows and with RECENT versions of R only. ----- For changing directories during a session, I use the following function, a slight modification of Andy Liaw's cd() function that also changes the titlebar: cd <- function(dir = tclvalue(tkchooseDirectory()), saveOld=NA, loadNew=TRUE) { # From Andy Liaw ... additions by MHP # Change the working directory during an R session # # First check that the tcl-tk package is available: stopifnot(require(tcltk)) # Print any error message from trying to load: if (.Platform$OS.type...
2006 Feb 15
2
Setting intial path under windows to MyComputer in Interactive file browser
Hello everyone, How can I specify in tcltk file browser the initial directory to "MyComputer" in Windows where Drives and Partition are accessible? And just a little question if anyone knows, is there a way to use the function choose.files under windows to select a directory? Thanks a lot for your help. Laetitia.
2007 May 02
2
choose.dir
Hi all, I have written a R-script under Windows using choose.dir. Now, I have seen that this function is missing at MacOS. Does anybody know an alternative? Antje
2004 Jul 15
3
More on global environment
To follow up on my previous question, suppose a user R session wants to unload one workspace and load another within an R session. Is the following the correct sequence? 1. save.image() to save the current workspace as .Rdata in the current working directory. 2. rm(list=ls()) to remove everything from the workspace. 3. setcwd("xxx") to set the new working directory. 4.
2005 Oct 14
4
Setting working directory interactively within a function
Is there anyway to have a function prompt the user for a working directory, equivalent to file.choose()? --Paul
2002 Nov 01
8
R-1.6.1 is released
...z files, I'm no longer providing a patch file. For the R Core Team, Peter D. Here's the relevant part of the NEWS file: CHANGES IN R VERSION 1.6.1 NEW FEATURES o Added a few "trivial and obviously missing" functions to tcltk: tkchooseDirectory, tkpopup, tkdialog, tkread o barplot() has a new argument `axis.lty', which if set to 1 allows the pre-1.6.0 behaviour of plotting the axis and tick marks for the categorical axis. (This was apparently not intentional, but axis() used to ignore lty=0.) Th...
2002 Nov 01
8
R-1.6.1 is released
...z files, I'm no longer providing a patch file. For the R Core Team, Peter D. Here's the relevant part of the NEWS file: CHANGES IN R VERSION 1.6.1 NEW FEATURES o Added a few "trivial and obviously missing" functions to tcltk: tkchooseDirectory, tkpopup, tkdialog, tkread o barplot() has a new argument `axis.lty', which if set to 1 allows the pre-1.6.0 behaviour of plotting the axis and tick marks for the categorical axis. (This was apparently not intentional, but axis() used to ignore lty=0.) Th...