Re: [ESS] executing Julia from org: error in ess-eval-region

2022-08-16 Thread Stephen Eglen via ESS-help
> > This works. Thank you! I have modified ob-julia directly. Are you > okay if I provide a patch to org with this single line change? If so, > do you want your name mentioned etc.? happy to have a patch sent to ob-julia -- can the git commit point to an archive of this discussion?

Re: [ESS] executing Julia from org: error in ess-eval-region

2022-08-15 Thread Stephen Eglen via ESS-help
> You need to ":results output" to the src line to have anything in the > results: > > #+begin_src julia :results output > x = [1, 2] > #+end_src thanks. Do you know why 'results output' is needed for Julia chunks, but not R? #+begin_src R 1 + 2 #+end_src #+RESULTS: : 3 Stephen

Re: [ESS] [External] Re: ESS confused about newest R

2022-07-13 Thread Stephen Eglen via ESS-help
> For me, that now starts R 4.2.0 on WIndows. > > However, given the fragility of regexps, does anyone (Martin?) know why > the ucrt now appears in versions on Windows, and whether that was > deliberate? ESS might well be the only program that machine reads that > date, but still we should try to

Re: [ESS] When the R window opens, sometimes it is side-by-side with my .Rnw file. I want them one above the other. It seems unpredictable

2022-05-27 Thread Stephen Eglen via ESS-help
> I'm using Vince Goulet's modified version of emacs 26.2 (build 1, > x86_64-w64-mingw32) of 2019-04-13 with ESS, on Windows 10. I use Sweave > and LaTeX, so I have my R code in .Rnw files. When I execute my first > line of R code, an R buffer opens of course. I prefer it to be below my > Rnw

Re: [ESS] .Rdata not loading

2021-12-23 Thread Stephen Eglen via ESS-help
Apologies if you've already tried this, but have you tried running R on its own in a terminal? Do you get the same error then when trying to load .RData? On Thu, Dec 23 2021, Rich Shepard via ESS-help wrote: > I use R with emacs and ESS. Each time I finish with a session I save the >

[ESS] rstudio-outline

2020-11-16 Thread Stephen Eglen via ESS-help
Here's a little snippet I wrote to generate comments of the form ## Create some journal names ### These are recognised by rstudio (among others) as section delimeters. https://support.rstudio.com/hc/en-us/articles/200484568-Code-Folding-and-Sections

Re: [ESS] Function to copy command to script?

2020-05-19 Thread Stephen Eglen via ESS-help
On Tue, May 19 2020, Kevin Wright via wrote: > Is there a function to copy an inferior-buffer R command back to the R > script and insert it at point? I'm not sure you get it in a single defun, but you can glue the following bits together:

Re: [ESS] Anyone tried Emacs 27.1 pretest with Windows 10 ?

2020-05-06 Thread Stephen Eglen via ESS-help
Good idea Phil. Also, Kevin -- does it crash with earlier versions of R? R 4.0.0 just came out so wondering if that is an additional degree of freedom for bugs to creep in. Stephen On Wed, May 06 2020, Phillip Lord via ESS-help wrote: > If you having problems please do send a bug report in.

Re: [ESS] SOLVED: Issue with polymode installed from ELPA

2019-10-06 Thread Stephen Eglen via ESS-help
> I guess this proves that working with packages can still be messed > up by dummies ;o) I don’t remember having these kinds of > problems with the XEmacs packaging system, but I guess I haven’t > done that in the last 6 years so maybe I am forgetting these SNAFU. The packaging system is also a

Re: [ESS] Emacs ESS cannot find R onmacos 10.12.6

2017-09-13 Thread Stephen Eglen
hi Robert, try the following steps and do report back 1. On your mac, open terminal and start R from within the terminal. if that works, what does "which R" report? 2. If 1 worked, open Emacs from within this terminal, and then do M-x shell to get a terminal within Emacs. Does "R" work

Re: [ESS] Quit window in ess-rdired-mode

2017-08-10 Thread Stephen Eglen
hi Igor, I'm amazed that ess-rdired has any users, I haven't used it for years since I wrote it. can you just say in a bit more detail what you want to happen -- can you give a concrete set of steps, e.g. M-x ess-rdired e.g. which buffer do you quit from, and which one (e.g. *R dired*, *R

Re: [ESS] Ever consider changing indentation on #?

2017-05-08 Thread Stephen Eglen
> That's not a style from the parser but from the printer, e.g. the third letter > of REPL rather than the first. > > Unlike gofmt, the R printer has been designed to print rather than format. thanks for the clarification. But is it the closest we've got to a formatting tool in R?

Re: [ESS] Ever consider changing indentation on #?

2017-05-06 Thread Stephen Eglen
since we are throwing ideas out there... perhaps what the R universe could do with is something similar to "gofmt" for the go language. All Go code looks the same, because there is a formatting tool, and everyone uses it. How about something similar for R...?!? Stephen

Re: [ESS] Ever consider changing indentation on #?

2017-05-04 Thread Stephen Eglen
hi Paul, > "what the Hell, the folding is borked!". This is more and more common > with the adoption of markdown-style commentary within R files. can you give an example of the markdown-style commentary? > Until now, I've said "too bad" when they complain about their code, > but now I'm

Re: [ESS] interacting with Docker

2017-04-18 Thread Stephen Eglen
hi Ista, I'm not sure I follow what you mean here for starting an R session within a docker container such that its available to ESS? On Tue, Apr 18 2017, Ista Zahn wrote: > Set your container to run ssh and then connect as normal following the > documentation at >

[R] Chopping a vector up into smaller vectors

2012-08-02 Thread Stephen Eglen
Anyone got a neat way to chop a vector up into smaller subvectors? This is what I have now, which seems inelegant: chop - function(v, counts) { stopifnot(sum(counts)==length(v)) end - cumsum(counts) beg - c(1, 1+end[-length(end)]) begend - cbind(beg, end) apply(begend, 1, function(x)

Re: [R] aligning axis labels in a colorkey from levelplot

2012-06-26 Thread Stephen Eglen
Deepayan Sarkar deepayan.sar...@gmail.com writes: You can specify a fixed-width fontfamily if that helps: levelplot(matrix(seq(4,120,l=9),3,3), colorkey = list(at = seq(0, 120, 20), labels = list(labels = c(' 0',' 20',' 40',' 60',' 80','100','120'),

Re: [R] aligning axis labels in a colorkey from levelplot

2012-06-19 Thread Stephen Eglen
Justification is hard-coded, and that's not easy to change. This is not only for the colorkey; e.g., xyplot(y~1, scales = list(alternating = 3)) will also give you left-aligned axes on the right. My only suggestion (other than custom labels as suggested by ilai) is

Re: [R] Adding title to colorkey

2012-06-19 Thread Stephen Eglen
This is slightly simpler: levelplot(matrix(1:9,3,3), ylab.right = title here, par.settings = list(layout.widths = list(axis.key.padding = 0, ylab.right = 2))) That's good enough for me - thanks!

[R] aligning axis labels in a colorkey from levelplot

2012-06-16 Thread Stephen Eglen
R does a great job with the fine details regarding plots. e.g in the following: library(lattice) y - -4:4/10 xyplot(y~1, las=1) the y axis is labelled with numbers -0.4, -0.2, 0.0, 0.2, 0.4 with the numbers aligned on the decimal point. How do I get the same behaviour in the colorkey of a

[R] Adding title to colorkey

2012-06-16 Thread Stephen Eglen
A recent paper on visualisation (in Neuron, a leading neuroscience journal) surveyed how well previous articles in this journal labelled their graphs (e.g. axis labelling and describing their error bars). Of particular interest is that (only) 40% of plots labelled what their colorkey was showing

Re: [R] Finding name of variable supplied as function argument

2012-02-25 Thread Stephen Eglen
I could of course do this the tedious way by simply entering the name-strings G1, G2 as arguments as well as the variable names G1, G2, in a call like meds3x3(G1,G2,G1,G2) But I'd like to simply be able to pick up, within the function, the names of the variables that were used as

Re: [R] Hinton Diagram for a matrix of weights

2012-02-08 Thread Stephen Eglen
On 12/08/2011 03:45 AM, Xavier Fernández i Marín wrote: Hello, Although I have used a general search engine, r-seek, and browsed CRAN for contributed packages and R Gallery, I have not been able to find an implementation of Hinton Diagrams for representing weighting matrices using R.

[R] Representation of scientific units

2011-12-08 Thread Stephen Eglen
Has anyone got a neat way in R to handle scientific units along with numeric vectors? e.g. in mathematica, there is a Units package to allow you to do the following: 85 Meter/Second * 10 Second answer: 850 Meter (taken from http://library.wolfram.com/howtos/units/) Thanks, Stephen

[R] Any demand for a useR 2011 tutorial on Emacs Speaks Statistics?

2010-10-18 Thread Stephen Eglen
Dear all, I'm thinking of organising a tutorial on Emacs Speaks Statistics (ESS) for next year's useR meeting. http://www.warwick.ac.uk/statsdept/useR-2011/ Tony (Rossini) organised one a few years ago which covered the following topics: \begin{enumerate} \item Introduction (now, 15

Re: [R] [ESS] Emacs + ESS + R installer

2009-10-07 Thread Stephen Eglen
Frank Liu frankcs...@gmail.com wrote: I and some students built an Emacs + ESS + R installer, which allows users to download and install the newest version of Emacs, ESS, and R with little pain.The size of the installer is about 8Mb. http://sourceforge.net/projects/emacs-for-r/ Please

[R] Article on teaching R

2009-09-01 Thread Stephen Eglen
/user/sje30/downloads.html) Stephen -- Stephen Eglen, DAMTP, Centre for Mathematical Sciences Wilberforce Road, Cambridge CB3 0WA, U.K. Tel +44 (0)1223 765 761 s.j.eg...@damtp.cam.ac.uk Fax +44 (0)1223 760 419 http://www.damtp.cam.ac.uk/user/eglen

[R] Using unicode character for 'middle dot' in options(OutDec)

2009-03-19 Thread Stephen Eglen
When drawing a graph, I'd like the unicode character 'middle dot' (or something else similar to \cdot in latex) to be used when writing numbers. Something like the following works for me: x - 1:10 y - runif(length(x)) par(las=1, bty='n') plot(x,y, ylim=c(0,1), yaxt='n') p - pretty(y) axis(2,

Re: [R] How to read last (incomplete) line from gzfile()?

2008-04-20 Thread Stephen Eglen
Prof Brian Ripley writes: I realize I didn't give a solution: scan(con, , sep=\n) Thanks for this (and for correcting the help page); this works. I also found a workaround using read.table which also allows gzfile connections with an incomplete last line. Stephen