[Rd] strange behavior from cex="*"

Duncan Murdoch murdoch.duncan at gmail.com
Thu Nov 17 13:18:36 CET 2011


On 11-11-16 7:29 PM, Duncan Murdoch wrote:
> On 11-11-16 5:26 PM, Ben Bolker wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 11-11-16 05:18 PM, peter dalgaard wrote:
>>>
>>> On Nov 16, 2011, at 22:38 , Ben Bolker wrote:
>>>
>>>>    Someone inquired on StackOverflow about apparently non-deterministic
>>>> graphics behaviour in R.  I noticed that they were using cex="*" and
>>>> discovered some potentially weird behavior.
>>>
>>> It can be reproduced much more simply (well, not the hang, but bad enough):
>>>
>>> In a plain R application console (OSX Snow Leopard),
>>>
>>> for (i in 1:100) plot(1:10,cex="*")
>>>
>>> will _sometimes_ show big circles, indicating random data being picked up.
>>>
>>> The "cex" is by definition numeric, so you can't expect to be able to pass a character string, but the code should check.
>>
>>    Looks (?) like the check could go in FixupCex (which already tests for
>> isReal, isInteger, and isLogical) in src/main/plot.c , unless there is a
>> wish to catch it earlier/in R code.
>
> Yes, that's where the check was missed.  I'll fix it.  The other
> parameters appear to have been checked properly.

Now fixed in R-devel and R-patched.

Duncan Murdoch



More information about the R-devel mailing list