Re: [Rd] Outdated information in regex.Rd

2015-11-19 Thread Martin Maechler
> Mikko Korpela 
> on Wed, 18 Nov 2015 11:35:14 +0200 writes:

> The NEWS for R-devel has the following item:
>> The previously included versions of zlib, bzip2, xz and PCRE have
>> been removed, so suitable external (usually system) versions are
>> required (see the ‘R Installation and Administration’ manual).

> Therefore I believe the following information in
> 'src/library/base/man/regex.Rd' is no longer valid:

>> If PCRE support was compiled from the sources within R, the PCRE
>> version is 8.36 as described here.

Not quite.  It is still *valid* : every statement about the
elements of the empty set are true, in the same sense that

   if (FALSE)
 "something or other"

is never invalid, but of course, that information should still
be removed because indeed, it is empty.

Thank you Mikko!
  (and excuse the completely unnecessary pickyness ;-)

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Outdated information in regex.Rd

2015-11-19 Thread Mikko Korpela
On 19.11.2015 12:05, Martin Maechler wrote:
>> Mikko Korpela 
>> on Wed, 18 Nov 2015 11:35:14 +0200 writes:
> 
> > The NEWS for R-devel has the following item:
> >> The previously included versions of zlib, bzip2, xz and PCRE have
> >> been removed, so suitable external (usually system) versions are
> >> required (see the ‘R Installation and Administration’ manual).
> 
> > Therefore I believe the following information in
> > 'src/library/base/man/regex.Rd' is no longer valid:
> 
> >> If PCRE support was compiled from the sources within R, the PCRE
> >> version is 8.36 as described here.
> 
> Not quite.  It is still *valid* : every statement about the
> elements of the empty set are true, in the same sense that
> 
>if (FALSE)
>  "something or other"
> 
> is never invalid, but of course, that information should still
> be removed because indeed, it is empty.
> 
> Thank you Mikko!
> (and excuse the completely unnecessary pickyness ;-)

Thanks, I see that you already edited the .Rd file. Furthermore, I
accept your pickiness ;-)

- Mikko

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Outdated information in regex.Rd

2015-11-19 Thread Brian Ripley


On 19 Nov 2015, at 10:05, Martin Maechler  wrote:

>> Mikko Korpela 
>>on Wed, 18 Nov 2015 11:35:14 +0200 writes:
> 
>> The NEWS for R-devel has the following item:
>>> The previously included versions of zlib, bzip2, xz and PCRE have
>>> been removed, so suitable external (usually system) versions are
>>> required (see the ‘R Installation and Administration’ manual).
> 
>> Therefore I believe the following information in
>> 'src/library/base/man/regex.Rd' is no longer valid:
> 
>>> If PCRE support was compiled from the sources within R, the PCRE
>>> version is 8.36 as described here.
> 
> Not quite.  It is still *valid* : every statement about the
> elements of the empty set are true, in the same sense that
> 
>   if (FALSE)
> "something or other"
> 
> is never invalid, but of course, that information should still
> be removed because indeed, it is empty.

Help pages are not intended to be just about the current version of R but also 
recent versions, and most builds of 3.2.x will meet the condition.

However, as from 3.2.0 a user can find the version of PCRE in use by 
extSoftVersion, and I have added a comment about that, including for 3.2.3.

> 
> Thank you Mikko!
>(and excuse the completely unnecessary pickyness ;-)
> 
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] format.pval

2015-11-19 Thread Benjamin Hofner
Today I stumbled upon a very strange behaviour of format.pval. If all p 
values are below the threshold eps one gets


format.pval(c(0.0002, 0.0004), eps = 0.001)
## [1] "< 0.001" "< 0.001"
format.pval(0.0004, eps = 0.001)
## [1] "< 0.001"

i.e., "< [eps]" as described in the manual of format.eps.


Yet, if one ore more are above (and one or more below) one gets

format.pval(c(1, 0.0004), eps = 0.001)
## [1] "1" "<0.001"

i.e., "<[eps]", without the blank after <.


One can also change this by setting digits = 1

format.pval(c(0.0002, 0.0004), eps = 0.001, digits = 1)
## [1] "<0.001" "<0.001"

From the code I've learned that

sep <- if (digits == 1L && nc <= 6L) "" else " "

if any p values are above eps (nc = max(nchar(pv)) and

sep <- if (digits == 1) "" else " "

if all p values are  smaller than eps.

(Why) is this behaviour intended? I do not see any reason for the 
different outputs (nor for the arbitrary nc threshold). Yet, if it is 
intended it should be documented.


Best,
Benjamin

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel