[Rd] PCRE, and setting C-, LD- and CPP-FLAGS for a local r-devel installation (Part 2)

2015-04-13 Thread Jesper Gådin
Hi!

I'm sorry I could not reply on the original message (
https://stat.ethz.ch/pipermail/r-devel/2015-April/070943.html), while I
wasn't a subscriber of the r-devel mail-list. But I got the ./configure to
work in the end. See below for the solution.

./configure 'LDFLAGS=-R/glob/jesper/software/bzip2-1.0.6/
-R/glob/jesper/software/zlib-1.2.8 -L/glob/jesper/software/bzip2-1.0.6
-L/glob/jesper/software/zlib-1.2.8
-L/glob/jesper/software/xz-5.2.1/bin/lib/
-R/glob/jesper/software/xz-5.2.1/bin/lib
-L/glob/jesper/software/pcre-8.36/build/lib
-R/glob/jesper/software/pcre-8.36/build/lib'
CFLAGS='-I/glob/jesper/software/bzip2-1.0.6/
-I/glob/jesper/software/zlib-1.2.8/
-I//glob/jesper/software/xz-5.2.1/bin/include/
-I/glob/jesper/software/pcre-8.36/build/include'
--without-recommended-packages

Jesper

[[alternative HTML version deleted]]

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


Re: [Rd] typo in R-exts.html section 6.9

2015-04-13 Thread Ravi Varadhan
You are correct that indefinite means an antiderivative.  A definite integral 
has both limits specified.  Technically correct terms are:  proper and improper 
definite integrals (although improper integrals are not synonymous with, but 
include integrals with an infinite range).  Your suggestion is perfectly fine.

Ravi

-Original Message-
From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of William Dunlap
Sent: Thursday, April 09, 2015 7:13 PM
To: r-devel@r-project.org
Subject: [Rd] typo in R-exts.html section 6.9

In 'Writing R Extensions' section 6.9 there is the paragraph

There are interfaces (defined in header R_ext/Applic.h) for definite and for 
indefinite integrals. ‘Indefinite’ means that at least one of the integration 
boundaries is not finite.

An indefinite integral usually means an antiderivative, not an integral over an 
infinite spread.  Should that first sentence end with 'for integrals over 
finite and infinite ranges' and the second sentence omitted?

Bill Dunlap
TIBCO Software
wdunlap tibco.com

[[alternative HTML version deleted]]

__
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] behavior of as.integer("5000000000")

2015-04-13 Thread Hervé Pagès

Hi,

  > as.integer("50")
  [1] 2147483647
  Warning message:
  inaccurate integer conversion in coercion

  > as.integer("-50")
  [1] NA
  Warning message:
  inaccurate integer conversion in coercion

Is this a bug or a feature? The man page suggests it's the latter:

  ‘as.integer’ attempts to coerce its argument to be of integer
  type.  The answer will be ‘NA’ unless the coercion succeeds.

even though someone could always argue that coercion of "50"
succeeded (for some definition of "succeed").

Also is there any reason why the warning message is different than
with:

  > as.integer(-50)
  [1] NA
  Warning message:
  NAs introduced by coercion

In the case of as.integer("-50"), it's not really that the
conversion was "inaccurate", it's a little bit worse than that. And
knowing that NAs where introduced by coercion is important.

Thanks,
H.

--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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


Re: [Rd] behavior of as.integer("5000000000")

2015-04-13 Thread Avraham Adler
On Tue, Apr 14, 2015 at 1:19 AM, Hervé Pagès  wrote:
> Hi,
>
>   > as.integer("50")
>   [1] 2147483647
>   Warning message:
>   inaccurate integer conversion in coercion
>
>   > as.integer("-50")
>   [1] NA
>   Warning message:
>   inaccurate integer conversion in coercion
>
> Is this a bug or a feature? The man page suggests it's the latter:


Hello, Hervé

Per help("as.integer"): "Note that current implementations of R use
32-bit integers for integer vectors, so the range of representable
integers is restricted to about +/-2*10^9: doubles can hold much
larger integers."

50 ~ 2^32.2 > 2^32 > 2*10^9

Avi


>
>   ‘as.integer’ attempts to coerce its argument to be of integer
>   type.  The answer will be ‘NA’ unless the coercion succeeds.
>
> even though someone could always argue that coercion of "50"
> succeeded (for some definition of "succeed").
>
> Also is there any reason why the warning message is different than
> with:
>
>   > as.integer(-50)
>   [1] NA
>   Warning message:
>   NAs introduced by coercion
>
> In the case of as.integer("-50"), it's not really that the
> conversion was "inaccurate", it's a little bit worse than that. And
> knowing that NAs where introduced by coercion is important.
>
> Thanks,
> H.
>
> --
> Hervé Pagès
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M1-B514
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpa...@fredhutch.org
> Phone:  (206) 667-5791
> Fax:(206) 667-1319
>
> __
> 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


Re: [Rd] behavior of as.integer("5000000000")

2015-04-13 Thread Martin Maechler

> Hi,
>> as.integer("50")
>[1] 2147483647
>Warning message:
>inaccurate integer conversion in coercion

>> as.integer("-50")
>[1] NA
>Warning message:
>inaccurate integer conversion in coercion

> Is this a bug or a feature? The man page suggests it's the
> latter:

I think you mean the "former", a bug.

and I agree entirely, see the following  " 2 x 2 " comparison :

  > N <- 5 * 8^-(0:7)
  > as.integer(N)
  [1] NA NA NA NA 1220703125  152587890   
190734862384185
  Warning message:
  NAs introduced by coercion 
  > as.integer(-N)
  [1]  NA  NA  NA  NA -1220703125  -152587890   
-19073486
  [8]-2384185
  Warning message:
  NAs introduced by coercion 
  > as.integer(as.character(N))
  [1] 2147483647 2147483647 2147483647 2147483647 1220703125  152587890   
190734862384185
  Warning message:
  inaccurate integer conversion in coercion 
  > as.integer(as.character(-N))
  [1]  NA  NA  NA  NA -1220703125  -152587890   
-19073486
  [8]-2384185
  Warning message:
  inaccurate integer conversion in coercion 



>‘as.integer’ attempts to coerce its argument to be of integer
>type.  The answer will be ‘NA’ unless the coercion succeeds.

> even though someone could always argue that coercion of "50"
> succeeded (for some definition of "succeed").

> Also is there any reason why the warning message is different than
> with:

>> as.integer(-50)
>[1] NA
>Warning message:
>NAs introduced by coercion

> In the case of as.integer("-50"), it's not really that the
> conversion was "inaccurate", it's a little bit worse than that. And
> knowing that NAs where introduced by coercion is important.

Yes.   
The message is less a problem than the bug, but I agree we
should try to improve it.

Martin


> -- 
> Hervé Pagès
> ...

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


Re: [Rd] behavior of as.integer("5000000000")

2015-04-13 Thread Hervé Pagès

On 04/13/2015 11:32 PM, Martin Maechler wrote:



Hi,
> as.integer("50")
[1] 2147483647
Warning message:
inaccurate integer conversion in coercion



> as.integer("-50")
[1] NA
Warning message:
inaccurate integer conversion in coercion



Is this a bug or a feature? The man page suggests it's the
latter:


I think you mean the "former", a bug.

and I agree entirely, see the following  " 2 x 2 " comparison :

   > N <- 5 * 8^-(0:7)
   > as.integer(N)
   [1] NA NA NA NA 1220703125  152587890   
190734862384185
   Warning message:
   NAs introduced by coercion
   > as.integer(-N)
   [1]  NA  NA  NA  NA -1220703125  -152587890  
 -19073486
   [8]-2384185
   Warning message:
   NAs introduced by coercion
   > as.integer(as.character(N))
   [1] 2147483647 2147483647 2147483647 2147483647 1220703125  152587890   
190734862384185
   Warning message:
   inaccurate integer conversion in coercion
   > as.integer(as.character(-N))
   [1]  NA  NA  NA  NA -1220703125  -152587890  
 -19073486
   [8]-2384185
   Warning message:
   inaccurate integer conversion in coercion




‘as.integer’ attempts to coerce its argument to be of integer
type.  The answer will be ‘NA’ unless the coercion succeeds.



even though someone could always argue that coercion of "50"
succeeded (for some definition of "succeed").



Also is there any reason why the warning message is different than
with:



> as.integer(-50)
[1] NA
Warning message:
NAs introduced by coercion



In the case of as.integer("-50"), it's not really that the
conversion was "inaccurate", it's a little bit worse than that. And
knowing that NAs where introduced by coercion is important.


Yes.
The message is less a problem than the bug, but I agree we
should try to improve it.


Sounds good. Thanks Martin,

H.



Martin



--
Hervé Pagès
...


--
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpa...@fredhutch.org
Phone:  (206) 667-5791
Fax:(206) 667-1319

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