That seems quite nice.
Note that there has been some related code posted. See:
http://tolstoy.newcastle.edu.au/R/help/03b/6406.html
which discusses some R idioms for list comprehensions.
Also the gsubfn package has some functionality in this direction. We
preface any function with fn$ to allow
Below is code that introduces a list comprehension syntax into R,
allowing expressions like:
> .[ sin(x) ~ x <- (0:11)/11 ]
[1] 0. 0.09078392 0.18081808 0.26935891 0.35567516 0.43905397
[7] 0.51880673 0.59427479 0.66483486 0.72990422 0.78894546 0.84147098
> .[ .[x*y ~ x <- 0:3] ~ y <-
Dear Brian,
Thank you for this.
John
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Prof Brian Ripley
> Sent: Sunday, December 09, 2007 1:05 PM
> To: John Fox
> Cc: r-devel@r-project.org
> Subject: Re: [Rd] Using Fortran 95 in an R package?
>
>
On Sun, 9 Dec 2007, John Fox wrote:
> Dear R-devel list members,
>
> What's the best current advice about writing Fortran code for use in R
> packages? The Writing R Extensions manual still says that the .Fortran
> interface is primarily intended for FORTRAN 77 code. In particular, are
> there por
Dear R-devel list members,
What's the best current advice about writing Fortran code for use in R
packages? The Writing R Extensions manual still says that the .Fortran
interface is primarily intended for FORTRAN 77 code. In particular, are
there portability issues if I use Fortran 95 in a package