Skip to content

Project in emacs + ess

4 messages · Naresh Gurbuxani, Bert Gunter, Martin Maechler +1 more

#
I have switched from RStudio to emacs.  In emacs, how can I create a project like in RStudio?


Within the project directory, I would like to create different directories for code, data, results, figures, documents, etc.  In RStudio project, relative references work well.  For example, an Sweave document in document directory can use command source('code/mycode.R').  In emacs, this does not work "out of the box".  In document folder, the command needs to be source('../code/mycode.R').  This is minor effort, but a better method must exist.


Thanks,

Naresh
#
Wrong list. This list is about R programming. You should address this to an
emacs support list. Better yet, to an ess list . Here's one place you might
start:

https://www.r-bloggers.com/using-r-with-emacs-and-ess/

Other resources can be found by a web search on "R ess"  .

Cheers,
Bert


Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Oct 18, 2018 at 9:12 PM Naresh Gurbuxani <
naresh_gurbuxani at hotmail.com> wrote:

            

  
  
#
> Wrong list. This list is about R programming. You should
    > address this to an emacs support list. Better yet, to an
    > ess list . Here's one place you might start:

    > https://www.r-bloggers.com/using-r-with-emacs-and-ess/

    > Other resources can be found by a web search on "R ess" .

Indeed, for completeness :

- The ESS website is at https://ess.r-project.org/

- There's an ESS dedicated mailing list "just parallel to" R-help:
  https://stat.ethz.ch/mailman/listinfo/ess-help

- We are currently beta testing a new release of ESS, "18.10",
  which *does* contain some project support.
  Prerelease tar/zip balls available from
  https://stat.ethz.ch/ESS/downloads/ess/Prerelease/
  
- ESS is developed on github now, and issues are tracked here:
  https://github.com/emacs-ess/ESS/issues/

Last but not least :
     Welcome to the world of Emacs and ESS !

--
Martin Maechler
ETH Zurich  (and ESS core team)


    > Cheers, Bert
    > Bert Gunter

    > "The trouble with having an open mind is that people keep
    > coming along and sticking things into it."  -- Opus (aka
    > Berkeley Breathed in his "Bloom County" comic strip )


    > On Thu, Oct 18, 2018 at 9:12 PM Naresh Gurbuxani <
> naresh_gurbuxani at hotmail.com> wrote:
>> I have switched from RStudio to emacs.  In emacs, how can
    >> I create a project like in RStudio?
    >> 
    >> 
    >> Within the project directory, I would like to create
    >> different directories for code, data, results, figures,
    >> documents, etc.  In RStudio project, relative references
    >> work well.  For example, an Sweave document in document
    >> directory can use command source('code/mycode.R').  In
    >> emacs, this does not work "out of the box".  In document
    >> folder, the command needs to be
    >> source('../code/mycode.R').  This is minor effort, but a
    >> better method must exist.
    >> 
    >> 
    >> Thanks,
    >> 
    >> Naresh
    >> 
    >> [[alternative HTML version deleted]]
    >> 
    >> ______________________________________________
    >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and
    >> more, see https://stat.ethz.ch/mailman/listinfo/r-help
    >> PLEASE do read the posting guide
    >> http://www.R-project.org/posting-guide.html and provide
    >> commented, minimal, self-contained, reproducible code.
    >> 

    > 	[[alternative HTML version deleted]]

    > ______________________________________________
    > R-help at r-project.org mailing list -- To UNSUBSCRIBE and
    > more, see https://stat.ethz.ch/mailman/listinfo/r-help
    > PLEASE do read the posting guide
    > http://www.R-project.org/posting-guide.html and provide
    > commented, minimal, self-contained, reproducible code.
#
Not exactly sure what you are looking for but here is my workflow which may
give you another perspective
1. my OS is linux
2. I edit my files in emacs (with ESS pulled in)
3. I use make (and Makefile) to compile .o's and .so's from .cpp where
necessary (i.e. I use Rcpp etc)
    (and also to build server.R and ui.R from smaller .R's for my shiny app)
4. I kick off RStudio in what you would call the "project" directory and
use source() commands as appropriate
    (For a given project I would generally have a small script that I
source as the first command in RStudio.)

This gives me the power of the various components
    linux - make, git, shell scripts, etc
    emacs - great editor
    RStudio - for debugging, testing etc

I definitely do not claim my workflow is optimal and am certainly open -
and curious - to understand your proposed workflow.

Regards,
Eric


On Fri, Oct 19, 2018 at 9:57 AM Martin Maechler <maechler at stat.math.ethz.ch>
wrote: