Here's some code I put together for checkpointing a function being
optimized. Hooking directly into optim would require modifying its C
code, so this seemed the easiest route. I've wanted more information on
the iterations than is currently provided, so this stuff some info back
in the calling env
Thomas Lumley wrote:
>On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
>
>
>>hi - in version 2.1 the command
>>
>>
>>
>>>-2^2
>>>
>>>
>>gives
>>
>>-4
>>
>>as the answer. (-2)^2 is evaluated correctly.
>>
>>
>
>So is -2^2. The precedence of ^ is higher than that of unary minus. It
Thomas Lumley wrote:
>On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
>
>
>>hi - in version 2.1 the command
>>
>>
>>
>>>-2^2
>>>
>>>
>>gives
>>
>>-4
>>
>>as the answer. (-2)^2 is evaluated correctly.
>>
>>
>
>So is -2^2. The precedence of ^ is higher than that of unary minus. It
While we're swapping precedence tales, can you guess what this gives:
> q <- TRUE
> 2 + !q + 3
It's "2", not "5". Bit me in the arse just the other day :-)
-- David Brahm ([EMAIL PROTECTED])
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/
Hi everybody,
I'd like to report that the 'cannot create directory' bug that we used
to have with
'R CMD build' on Windows (and sometimes on Linux too) seems to have
disappeared.
It's really nice because, thanks to this fix, for the first time we have
a reliable
automated build system for the
Thomas Lumley <[EMAIL PROTECTED]> writes:
> On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
> > hi - in version 2.1 the command
> >
> > >-2^2
> >
> > gives
> >
> > -4
> >
> > as the answer. (-2)^2 is evaluated correctly.
>
> So is -2^2. The precedence of ^ is higher than that of unary minus. It
Thomas Lumley <[EMAIL PROTECTED]> writes:
> On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
> > hi - in version 2.1 the command
> >
> > >-2^2
> >
> > gives
> >
> > -4
> >
> > as the answer. (-2)^2 is evaluated correctly.
>
> So is -2^2. The precedence of ^ is higher than that of unary minus. It
Precedence rules are tricky, in general, and the usual
advice with most programming languages is to liberally use
parentheses when in doubt. Its actually not that surprising
in this case but consider 0-1:3 and -1:3 which give different
results since one uses binary minus and the other uses
unary m
How do people even notice stuff like this. You would never hard-coding
(-2)^2 or -2^2 anyway. The part being squared would be a variable, in which
case it works correctly:
> a<- -2
> a
[1] -2
> a^2
[1] 4
Sometimes it seems that people go looking for bugs... and therefore see bugs
all around them
On 1/6/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
> > hi - in version 2.1 the command
> >
> > >-2^2
> >
> > gives
> >
> > -4
> >
> > as the answer. (-2)^2 is evaluated correctly.
>
> So is -2^2. The precedence of ^ is higher than that of unary mi
On 1/6/06, Thomas Lumley <[EMAIL PROTECTED]> wrote:
> On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
>
> > hi - in version 2.1 the command
> >
> > >-2^2
> >
> > gives
> >
> > -4
> >
> > as the answer. (-2)^2 is evaluated correctly.
>
> So is -2^2. The precedence of ^ is higher than that of unary mi
On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote:
> hi - in version 2.1 the command
>
> >-2^2
>
> gives
>
> -4
>
> as the answer. (-2)^2 is evaluated correctly.
So is -2^2. The precedence of ^ is higher than that of unary minus. It
may be surprising, but it *is* documented and has been in S for a l
hi - in version 2.1 the command
>-2^2
gives
-4
as the answer. (-2)^2 is evaluated correctly.
Cheers,
George Casella
--
George Casella Phone: (352) 392-1941 Ext. 204
Distinguished Professor and Chair Cell: (352) 682-7210
Department of Statistics
On Thu, 5 Jan 2006, Dominick Samperi wrote:
> Dirk Eddelbuettel wrote:
>
>> Dominick Samperi wrote a Rcpp.{hpp,cpp} class for
>> C++ to R interface that is used in RQuantLib. Dominick
>> was musing about releasing this stand-alone to CRAN
>> as well, but I don't think it has happened.
>
> It just
Deepayan Sarkar wrote:
>On 10/20/05, ernesto <[EMAIL PROTECTED]> wrote:
>
>[...]
>
>
>
>>Hi Deepayan,
>>
>>I see that there are alternatives, I found one my self that works and
>>it's transparent for the user.
>>
>>I don't want to implement solutions that force the user to use lattice
>>methods
On Thu, 5 Jan 2006, Simon Urbanek wrote:
> Karen,
>
> On Jan 5, 2006, at 5:18 PM, <[EMAIL PROTECTED]>
> <[EMAIL PROTECTED]> wrote:
>
>> I am trying to run a R script which makes use of the MCLUST package.
>> The script can successfully read in the approximately 17000 data
>> points ok, but then th
16 matches
Mail list logo