similar to: Setting working directory interactively within a function

Displaying 20 results from an estimated 10000 matches similar to: "Setting working directory interactively within a function"

2005 Oct 14
0
Fw: Setting working directory interactively within a function
>On 10/14/2005 1:08 PM, Berton Gunter wrote: >> ?setwd >> e.g. setwd(file.choose()) >> >> BTW, you could have found this on your own via help.search('working >> directory') . Base R has quite good docs -- you should try them first. >> >> -- Bert Gunter > >That won't work in Windows, where the dialogs don't consider directories
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 &&
2004 Jul 15
3
color scale to label a plot
Hello R-helpers I want to put a color scale in a plot: I've got an xy plot where the values of the response (z=f(x,y)) is symbolically given by colors (like heat or rainbow color scale) I would like to put such a scale with apprpriates labels in the plot, so as to facilitate the interpretation (like in a finite elements result plot) How is taht possible? Thanks Anne [[alternative
2005 Oct 19
3
adding error bars to lattice plots
Dear R-Users, how to include error bars within lattice? How should the panel = function(x,y,...){ looks like? Does panel.arrows works here as well? I appreciate any help on this. Regards, Mario AT [[alternative HTML version deleted]]
2005 Jul 27
4
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the "Contributed" link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used functions so that they can be easily found. For example, paste() is under the
2006 Aug 18
2
dataframe of unequal rows
Hi, How can I read data of unequal number of observations (rows) as is (i.e. without introducing NA for columns of less observations than the maximum. Example: A B C D 1 10 1 12 2 10 3 12 3 10 4 12 4 10 5 10 Thanks in advance. Sachin --------------------------------- [[alternative HTML version deleted]]
2006 Mar 07
7
reading in only one column from text file
How do I manipulate the read.table function to read in only the 2nd column??? [[alternative HTML version deleted]]
2006 May 16
3
everytime I download a new version of R, need I reinstall all packages?
Can the packages that I've installed in R 2.2.1 be automatically imported to R 2.3.0? Otherwise it is a hassle everytime I update a new version of R... [[alternative HTML version deleted]]
2006 Apr 06
5
pros and cons of "robust regression"? (i.e. rlm vs lm)
Can anyone comment or point me to a discussion of the pros and cons of robust regressions, vs. a more "manual" approach to trimming outliers and/or "normalizing" data used in regression analysis?
2006 Mar 30
2
R Reference Card (especially useful for Newbies)
Newbies (and others!) may find useful the R Reference Card made available by Tom Short and Rpad at http://www.rpad.org/Rpad/Rpad-refcard.pdf or through the "Contributed" link on CRAN (where some other reference cards are also linked). It categorizes and organizes a bunch of R's basic, most used functions so that they can be easily found. For example, paste() is under the
2006 Jun 22
1
High breakdown/efficiency statistics -- was RE: Rosner's test [Broadcast]
What would be nice is to have something like a "robust" task view... Andy From: Berton Gunter > > Many thanks for this Martin. There now are several packages > with what appear to be overlapping functions (or at least > algorithms). Besides those you mentioned, "robust" and > "roblm" are at least two others. Any recommendations about > how or
2005 May 06
4
Choices from a matrix
Could someone please suggest a more clever solution to the following problem than my loop below? Given X a 2xN matrix X, and I a k-subset of N, Generate the (2^k)xN matrix Y with columns not in I all zero and the other columns with all choices of an entry from the first or second row of X. For example, with X <- matrix(1:8, nrow=2) I <- c(1,3) X is 1 3 5 7 2 4 6 8 and Y should be 1 0 5
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)
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 Mar 25
2
Casting in R
Hi, I am looking for functions that would allow me to access raw binary data of R vectors. One way would be to use: x = (1:10)*pi writeBin(x, "temp.bin") r = readBin("temp.bin", "raw", n=length(x)*8) Other to write my own C code. Is there any other simpler way? I this message is a rewording of my yesterday message "Looking for function for Double to
2005 Nov 30
3
strange plots with type = "h" option
Hello, With the new version 2.2.0, I get strange plots when using the histogram-like option in plot(). For example, a plot of binomial probabilities: > plot(0:10,dbinom(0:10,10,.1), type = "h", lwd = 30) gives me weird fat cirular bars, with mass out at values with low probability. What is the issue here? This never happened with earlier versions. R on Windows XP SP 2 Intel
2005 Nov 02
1
Visualizing a Data Distribution -- Was: breaks in hist()
> > Leaf Sun wrote: > > The histogram is highly screwed to the right, say, the range > > of the vector is [0, 2], but 95% of the value is squeezed in > > the interval (0.01, 0.2). I guess the histogram is as you wrote. See http://web.maths.unsw.edu.au/~tduong/seminars/intro2kde/ for a short explanation. > -----Original Message----- > From: Berton Gunter
2005 Mar 18
3
plotmath question
R listers: I have been foiled by plotmath! (in R 2.01,Windows 2000) The task: Plot a normal density and label the ticks as mu - 3 sigma, mu - 2 sigma, ...., mu + 3 sigma, where the mu's and sigmas appear as Greek symbols, of course. The following code does this: x<-seq(-3,to=3,by=.01) y<-dnorm(x) plot(x,y,type='h',col='lightblue',axes=FALSE)
2006 Aug 03
1
Looking for transformation to overcome heterogeneity ofvariances
Peter You question is difficult to answer without more information about the distribution of your residuals. Different residual patterns call for different transformations to stabilize the variance. One very common form of heterocedasticity is increasing variance with increasing values of an independent predictor, i.e. the variance of the residuals of y=x increase as x increases. In this case a
2005 Mar 30
4
how i can get input from "user input"
Hello, Could you please tell me how i can get an input from the user in R? C-Ming Mar 29, 2005 --------------------------------- [[alternative HTML version deleted]]