Re: [Rd] ALLOCATE in a FORTRAN subroutine

2016-03-07 Thread MAURICE Jean - externe
Hi Martyn, Many thanks for your answer. If I make it short : we can, once we know how to do it, 'drive' R from within FORTRAN for example to do a Myarray = seq(0, mydimension) in R once we have compute mydimension in FORTRAN. Is that correct ? If yes : it's too 'complicated' for the time I a

[Rd] body(NULL) <- something; ditto formals() -- should not work

2016-03-07 Thread Martin Maechler
I'm proposing to signal an error (from R >= 3.3.0) in such examples -- which do "work" in R 3.2.x and earlier : > f <- NULL; body(f) <- quote(sin(a+1)); f function () sin(a + 1) > g <- NULL; formals(g) <- alist(x = pi, y=); g function (x = pi, y) NULL > The proposal is that the underlying C

Re: [Rd] ALLOCATE in a FORTRAN subroutine

2016-03-07 Thread Martyn Byng
Hi, "we can, once we know how to do it, 'drive' R from within FORTRAN" I am not sure I understand what you mean by this ... You can call routines written in Fortran or C from within R - how easy this is depends on the interfaces to those routines. You can call (some) R functionality from C (see

Re: [Rd] ALLOCATE in a FORTRAN subroutine

2016-03-07 Thread Berend Hasselman
> On 7 Mar 2016, at 16:45, MAURICE Jean - externe > wrote: > > Hi Martyn, > > Many thanks for your answer. If I make it short : > we can, once we know how to do it, 'drive' R from within FORTRAN for example > to do a > Myarray = seq(0, mydimension) > in R once we have compute mydimension

Re: [Rd] ALLOCATE in a FORTRAN subroutine

2016-03-07 Thread Berend Hasselman
> On 7 Mar 2016, at 18:55, Berend Hasselman wrote: > >> >> On 7 Mar 2016, at 16:45, MAURICE Jean - externe >> wrote: >> >> Hi Martyn, >> >> Many thanks for your answer. If I make it short : >> we can, once we know how to do it, 'drive' R from within FORTRAN for example >> to do a >> Myar

Re: [Rd] Could unit.list() from grid package be made an exported function?

2016-03-07 Thread Paul Murrell
Hi I think the right solution is to add [<- methods for units. I will take a look at whether I can get that done for the release of R 3.3.0 Paul On 07/03/16 07:34, Wilke, Claus O wrote: Hello, certain manipulations of ggplot2 graphs, in particular aligning them, require the function grid:::un

Re: [Rd] Could unit.list() from grid package be made an exported function?

2016-03-07 Thread Paul Murrell
Hi Subassignment for units has been committed to r-devel. You should now be able to do things like ... x <- unit(1:3, "mm") x[2] <- unit(.5, "npc") (see grid/tests/units.R for more complex examples) This works for me for the three stackoverflow scenarios. Any confirmation that it also works fo