Keith Ponting | 1 Jul 12:48 2011

Re: Code contribution or suggestion

Another alternative that I use for my Sweave sources is template
http://emacs-template.sourceforge.net  - setup TEMPLATE.rnw as you like
it (optionally including useful substitutions like author name,
date,...) and then every time you open a new .rnw file you will be asked
whether you want to use that template.

BTW I also use and like yasnippet, but I think the template.el approach
would be less typing/mousing per document.

Keith Ponting
Aurix Ltd, Malvern WR14 3SZ  UK

> From: Steve Lianoglou <mailinglist.honeypot <at> gmail.com>
> 
> Hi Jim,
> 
> Unless I'm missing something, an alternative way to achieve your
> templatings stuffs that you've got here is to use yasnippet:
> http://code.google.com/p/yasnippet/
> 
> You can setup templates rather easily for various languages (not just
> sweave), and making new templates are pretty easy (no elisp required
> :-)
> 
> Here's a video of it in action:
> http://www.youtube.com/watch?v=76Ygeg9miao
> 
> The first ~ minute is how to install it, which you can skip if you're
in
> a hurry and just want to check it out.
(Continue reading)

Vitalie Spinu | 7 Jul 17:40 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

Ulrich Keller <uhkeller <at> googlemail.com> writes:

> Thans for your reply, Rodney.
>
> And sorry, I didn't phrase the description quite right. I too get the
> new prompt only after 5 seconds, but this is a very subtle indicator of
> R's status. If I send more than one line with ess-eval-region, I'd have
> to count the new prompts and see if they match the number of lines I
> sent to determine if R is finished or not. Not very practical.
>
> The background is that I often run largish scripts that read complicated
> and often broken data. Usually, something goes wrong somewhere, so
> stepping through the script and fixing errors as they occur is really
> the only option. Because the data tend to be large, running a few lines
> can take a some minutes, and it would be nice if ESS could tell me when
> R is done.
>

Hi Ulrich,

I've just implemented the animated indicator of process status in
ess-tracebug (http://code.google.com/p/ess-tracebug/#Miscellaneous_enhancements)

Technically it is not always possible to tell if the process is busy. But in
most of the cases, it works smoothly.

Particularly if you send your input with 'ess-eval-visibly-p' being 't' it
will always work.

It will also always work with one line input.
(Continue reading)

Rodney Sparapani | 7 Jul 17:56 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

Vitalie Spinu wrote:
> Hi Ulrich,
>
> I've just implemented the animated indicator of process status in
> ess-tracebug (http://code.google.com/p/ess-tracebug/#Miscellaneous_enhancements)
>
> Technically it is not always possible to tell if the process is busy. But in
> most of the cases, it works smoothly.
>
> Particularly if you send your input with 'ess-eval-visibly-p' being 't' it
> will always work.
>
> It will also always work with one line input.
>
> With several commands input you better spread your commands for several
> lines or enclose with {...}:
>
> for(i in 1:5)
>     Sys.sleep(.5)
> for(j in 1:10) Sys.sleep(.4)
>
> instead of
>
> for(i in 1:5) Sys.sleep(.5)
> for(j in 1:10) Sys.sleep(.4)
>
> Personally I don't see how to improve on what is already there.
>
> Enjoy,
> Vitalie
(Continue reading)

Vitalie Spinu | 7 Jul 18:20 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

>>
>> for(i in 1:5) Sys.sleep(.5)
>> for(j in 1:10) Sys.sleep(.4)
>>

> Hi Vitalie:
>
> Very nice!  However, I see the same behavior for those 2 blocks of
> code.  Or is it so subtle that I didn't notice?  Thanks.
>

Yes the first 2.5 sec you didn't notice. A better example is this:

for(i in 1:10) Sys.sleep(.5)
cat("here\n")

versus:

for(i in 1:10)
    Sys.sleep(.5)
cat("here\n")

also

for(i in 1:10) Sys.sleep(.5)

works fine because i am treating the last line (or the only line) of
the block, separately.

These  examples are pretty contrived, and in real applications
(Continue reading)

Rodney Sparapani | 7 Jul 20:45 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

Vitalie Spinu wrote:
> Yes the first 2.5 sec you didn't notice. A better example is this:
> 
> for(i in 1:10) Sys.sleep(.5)
> cat("here\n")
> 
> versus:
> 
> for(i in 1:10)
>     Sys.sleep(.5)
> cat("here\n")
> 
> also
> 
> for(i in 1:10) Sys.sleep(.5)
> 
> works fine because i am treating the last line (or the only line) of
> the block, separately.
> 
> These  examples are pretty contrived, and in real applications
> laborious command will necessarily print something or be multi-line,
> which is happily detected.
> 
> Vitalie.
> 

Hi Vitalie:

Ok, I think I get it now.  However, I guess we need to create a
list of functions to except from the spinner.  For example,
(Continue reading)

Vitalie Spinu | 7 Jul 21:49 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

On Thu, Jul 7, 2011 at 8:45 PM, Rodney Sparapani <rsparapa <at> mcw.edu> wrote:

> Hi Vitalie:
>
> Ok, I think I get it now.  However, I guess we need to create a
> list of functions to except from the spinner.  For example,
> it thinks that help.start() never ends.  Perhaps, that is really
> correct, I don't know.  But, clearly, not what the user would
> like to see.
>

Hi Rodney,

I couldn't reproduce help.start() problem (at least on Ubuntu).

Spinner is not supposed to interfere with evaluation. All what I do is
to set up a  timer which checks the state of the process every .5 sec.
If you have any issues with evaluation it is probably something else.

Thanks for the feedback.
Vitalie

> --
> Rodney Sparapani       Center for Patient Care and Outcomes Research
> Sr. Biostatistician               http://www.mcw.edu/pcor
> 4 wheels good, 2 wheels better!   Medical College of Wisconsin (MCW)
> WWLD?:  What Would Lombardi Do?   Milwaukee, WI, USA
>

______________________________________________
(Continue reading)

Rodney Sparapani | 7 Jul 22:12 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

Vitalie Spinu wrote:
> Hi Rodney,
>
> I couldn't reproduce help.start() problem (at least on Ubuntu).
>
> Spinner is not supposed to interfere with evaluation. All what I do is
> to set up a  timer which checks the state of the process every .5 sec.
> If you have any issues with evaluation it is probably something else.
>
> Thanks for the feedback.
> Vitalie
>   
For me, after the first help.start() it is still OK.  But, when you
click on Packages, and you see the buffer say "Making packages.html
. done", then I get the spinner endlessly.  If I then issue
help.start() again and click on Packages, it's fine.  Not really
sure what is going on.

--

-- 
Rodney Sparapani       Center for Patient Care and Outcomes Research
Sr. Biostatistician               http://www.mcw.edu/pcor
4 wheels good, 2 wheels better!   Medical College of Wisconsin (MCW)
WWLD?:  What Would Lombardi Do?   Milwaukee, WI, USA

______________________________________________
ESS-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Ross.Darnell | 8 Jul 00:45 2011
Picon
Picon

ESS on OSX has lost R path


I would appreciate help with this problem between Enacs-ESS and R.

I am  newbie to Mac OSX and I appear to have lost the connection between ESS and R.  ESS cannot find R. The OS knows
where R is  but Emacs-ESS doesn't.  I did have it working initially but must have altered something to   break
it.  I am using Vincent Goulet 's build of Emacs/ESS/Auctex.

I could point to R.all(?) explicitly but interested in knowing why it isn;t there by default.

Darnell, Ross (CMIS, Dutton Park)
Ross.Darnell <at> csiro.au<mailto:Ross.Darnell <at> csiro.au>

______________________________________________
ESS-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Vitalie Spinu | 8 Jul 11:09 2011
Picon

Re: How to tell if R is ready after ess-eval-*?

On Thu, Jul 7, 2011 at 10:12 PM, Rodney Sparapani <rsparapa <at> mcw.edu> wrote:

> For me, after the first help.start() it is still OK.  But, when you
> click on Packages, and you see the buffer say "Making packages.html
> . done", then I get the spinner endlessly.  If I then issue
> help.start() again and click on Packages, it's fine.  Not really
> sure what is going on.
>
Ah, I see. For some reason the printed output from R's HTTP server
commands does not end with ">". It looks like the program is still
running in the background.
The only way that I am aware of to generate this from R is to use
'scan' to wait for user input. It might be that it's an intended
feature to make clear that R HTTP server session is in progress.

Vitalie.

______________________________________________
ESS-help <at> r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/ess-help

Marianne Promberger | 8 Jul 11:37 2011
Picon

save commands to .Rhistory?

Dear list,

In an R process buffer in Emacs/ESS, I can cycle through the history
of previous commands with C-uparrow.

But the history only contains commands entered directly in the R
process buffer. Commands sent from a command file to the process eg
via C-c C-c do not get added to the history.

The same pattern holds for which commands are, or are not, in the
local .Rhistory file after q().

I would like commands sent from an external command file to show up in
the history, too.

Possible?

Thanks,

Marianne

--

-- 
Marianne Promberger PhD
King's College London
London SE1 9RT
GnuPG/PGP public key ID 80AD9916
.tex .bib .R .Rnw files welcome

______________________________________________
ESS-help <at> r-project.org mailing list
(Continue reading)


Gmane