Re: [R] Where to put source code?

2009-08-22 Thread Ron Burns
Peter- I use emacs and ESS. Google r ess emacs and check out the first few hits. I use a split screen with the R file to edit on the left and get the R output on the right. Single line commands are executed with C-c C-n and selected regions are executed using C-c C-r as well as a bunch of

Re: [R] Where to put source code?

2009-08-22 Thread Sarah Goslee
Or, even more simply: save your commands or functions in a file. You can load them from R using: source(path/to/mystuff.R) Sarah On Sat, Aug 22, 2009 at 6:22 PM, Ron Burnsrrbu...@cox.net wrote: Peter- I use emacs and ESS.  Google r ess emacs and check out the first few hits. I use a split

[R] Where to put source code?

2009-08-21 Thread Peter Meilstrup
I'm trying to move from Matlab to R, and I'm stuck even getting started. This sounds to me like the dumbest question in the world but... how does one put R source code in files? Over the last three days I've gone front to back through the Introduction to R and the R Language Definition, and while

Re: [R] Where to put source code?

2009-08-21 Thread baptiste auguie
Hi, Say you have the following data and functions that you want to reuse, d = data.frame(1:10) foo = function(x,y , ...){ plot(x,y, type=l, ...) } You may save the code in a file testing.r, noting that in general data may find a convenient storage format using save(d, file=

Re: [R] Where to put source code?

2009-08-21 Thread Romain Francois
Hi, You might be interested in : - this (out of date) page : http://www.sciviews.org/_rgui/ - this (not yet filled) page : http://wiki.r-project.org/rwiki/doku.php?id=guis:projects for a list of potential guis/text editor you can use to write your R code. Romain On 08/21/2009 12:06 PM,

Re: [R] Where to put source code?

2009-08-21 Thread Barry Rowlingson
On Fri, Aug 21, 2009 at 11:06 AM, Peter Meilstruppeter.meilst...@gmail.com wrote: I'm just looking for the local equivalent of (in matlab) writing a function, saving it as functionName.m and then being able to call functionName(). Or in Python of writing a module.py and then typing import