Thanks Luke.
I used codetools::walkCode to look for functions that returned the
value of a loop and found a surprising number in base R.
However, it looks like non of these functions were written to return
anything useful (the side effects were important), so the change
to loop-returns-NULL should
nicolas.thierry-m...@imag.fr wrote:
Hi,
This is with a centos 5.3 x86_64 system, using R 2.8.1 (details below).
In a directory where R is invoked, at the end of a session R offers to
"Save workspace image". Replying yes creates/updates at least two files
in the current directory: .Rhistory a
Thanks for the report.
It turns out that a similar issue arises in while() loops without
break/next being involved because the test expression is evaluated
after the final body evaluation. After some discussion we decided it
was simplest both for implementation and documentation to have the
valu
Hi,
This is with a centos 5.3 x86_64 system, using R 2.8.1 (details below).
In a directory where R is invoked, at the end of a session R offers to
"Save workspace image". Replying yes creates/updates at least two files
in the current directory: .Rhistory and .RData.
.Rhistory is created with p
If ... is not available you can get a minor reduction using fn$ in gsubfn.
Any function call prefaced by fn$ allows the use of formulas as functions
(and perl-like interpolation of strings) in the call args (subject to certain
rules that determine which args are interpreted and which not). The LHS
Prof Brian Ripley wrote:
> I think the idiom of the languages from which this comes would indeed
> to be use an anonymous function, and in R to use ... and no braces, as
> in
>
> Reduce(function(...) merge(..., by="state", all=TRUE), z)
>
> But that's not the (ony) R idiom, so I am happy to add
On Sat, 6 Jun 2009, Ben Bolker wrote:
Is there a reason that Reduce() doesn't take a "..." argument that
would allow arbitrary extra arguments to be passed through to the function?
Here is a little example of how this would be convenient:
z <- list(
data.frame(state=c("California")
Dear R gurus,
I think that cmdscale() function has problems with non-Euclidean
distances which have negative eigenvalues. The problems are two-fold:
(1) Wrong eigenvalue is removed: there will be at least one zero
eigenvalue in cmdscale, and the function assumes it is the last one.
With non-Eucl
> "CG" == Christophe Genolini
> on Tue, 09 Jun 2009 22:11:51 +0200 writes:
CG> Hi all,
CG> I am programming using S4. I define two classes, "B" is inheriting from
CG> "A". Apparently (at least since version 2.9.0 ?), when the correct
CG> signature is not find,
CG