[R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Wang, Zhu
Hello,

In an R function within a package, I would like to call a Fortran subroutine to 
compute lower gamma function. Any advice will be appreciated.

Thanks!

Zhu Wang

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Wang, Zhu
Sorry for not making myself clear: The Fortran subroutine in an R package needs 
to call incomplete gamma function.

-Original Message-
From: R-package-devel  On Behalf Of Ben 
Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

     Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:
> Hello,
>
> In an R function within a package, I would like to call a Fortran subroutine 
> to compute lower gamma function. Any advice will be appreciated.
>
> Thanks!
>
> Zhu Wang
>
>   [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Bert Gunter
BTW, if you search for "incomplete gamma function" on Rseek.org, you will
find whole packages for this.

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Jul 21, 2020 at 10:54 AM Bert Gunter  wrote:

> Why? -- see ?dgamma
>
> See also the section on including fortran code in "Writing R Extensions,"
> which should be your first port of call for such questions.
>
> If neither of these is what you need, it may be helpful if you explain why
> not.
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along and
> sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Tue, Jul 21, 2020 at 10:45 AM Wang, Zhu  wrote:
>
>> Hello,
>>
>> In an R function within a package, I would like to call a Fortran
>> subroutine to compute lower gamma function. Any advice will be appreciated.
>>
>> Thanks!
>>
>> Zhu Wang
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-package-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
>

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Bert Gunter
Why? -- see ?dgamma

See also the section on including fortran code in "Writing R Extensions,"
which should be your first port of call for such questions.

If neither of these is what you need, it may be helpful if you explain why
not.

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Tue, Jul 21, 2020 at 10:45 AM Wang, Zhu  wrote:

> Hello,
>
> In an R function within a package, I would like to call a Fortran
> subroutine to compute lower gamma function. Any advice will be appreciated.
>
> Thanks!
>
> Zhu Wang
>
> [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Ben Bolker
    Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)


On 7/21/20 1:44 PM, Wang, Zhu wrote:

Hello,

In an R function within a package, I would like to call a Fortran subroutine to 
compute lower gamma function. Any advice will be appreciated.

Thanks!

Zhu Wang

[[alternative HTML version deleted]]

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


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


Re: [R-pkg-devel] [External] Re: incomplete gamma function Fortran subroutine

2020-07-21 Thread Ben Bolker
  Interesting.  It looks like the way to make use of this is to combine 
the information in section 6.7.1 ("Distribution functions", including 
pgamma ...) with section 6.6 "Calling C from Fortran and vice versa" ?


On 7/21/20 4:33 PM, luke-tier...@uiowa.edu wrote:

Looking at this section of WRE may help:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Numerical-analysis-subroutines 



Best,

luke

On Tue, 21 Jul 2020, Wang, Zhu wrote:

Thanks to Ben and John. Perhaps the program should call pgamma in R 
and pass the number to Fortran. Calling some Fortran subroutines 
older than R can trigger concerns when submitting the package to the 
CRAN.


Best,
Zhu

-Original Message-
From: John P. Nolan 
Sent: Tuesday, July 21, 2020 1:43 PM
To: Wang, Zhu ; Ben Bolker ; 
r-package-devel@r-project.org

Subject: RE: [R-pkg-devel] incomplete gamma function Fortran subroutine

As others have said, built-in function pgamma is a (normalized) 
version of the incomplete gamma function!   John


-Original Message-
From: R-package-devel  On 
Behalf Of Wang, Zhu

Sent: Tuesday, July 21, 2020 2:16 PM
To: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

External Email: Use caution with links and attachments.

Sorry for not making myself clear: The Fortran subroutine in an R 
package needs to call incomplete gamma function.


-Original Message-
From: R-package-devel  On 
Behalf Of Ben Bolker

Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

    Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)


On 7/21/20 1:44 PM, Wang, Zhu wrote:

Hello,

In an R function within a package, I would like to call a Fortran 
subroutine to compute lower gamma function. Any advice will be 
appreciated.


Thanks!

Zhu Wang

  [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7
rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pmvi
Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=


__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=

__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=

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





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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Wang, Zhu
Thanks Steven.

Zhu

From: Steven Scott 
Sent: Tuesday, July 21, 2020 1:30 PM
To: Wang, Zhu 
Cc: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

You can often find this kind of code on netlib.org.  Just 
include it with the fortran code in your package.

On Tue, Jul 21, 2020 at 11:22 AM Wang, Zhu 
mailto:wan...@uthscsa.edu>> wrote:
Sorry for not making myself clear: The Fortran subroutine in an R package needs 
to call incomplete gamma function.

-Original Message-
From: R-package-devel 
mailto:r-package-devel-boun...@r-project.org>>
 On Behalf Of Ben Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

 Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:
> Hello,
>
> In an R function within a package, I would like to call a Fortran subroutine 
> to compute lower gamma function. Any advice will be appreciated.
>
> Thanks!
>
> Zhu Wang
>
>   [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing 
> list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

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

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread John P. Nolan
As others have said, built-in function pgamma is a (normalized) version of the 
incomplete gamma function!   John

-Original Message-
From: R-package-devel  On Behalf Of 
Wang, Zhu
Sent: Tuesday, July 21, 2020 2:16 PM
To: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

External Email: Use caution with links and attachments.

Sorry for not making myself clear: The Fortran subroutine in an R package needs 
to call incomplete gamma function.

-Original Message-
From: R-package-devel  On Behalf Of Ben 
Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

 Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:
> Hello,
>
> In an R function within a package, I would like to call a Fortran subroutine 
> to compute lower gamma function. Any advice will be appreciated.
>
> Thanks!
>
> Zhu Wang
>
>   [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
> man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7
> rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pmvi
> Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=

__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] [External] Re: incomplete gamma function Fortran subroutine

2020-07-21 Thread Wang, Zhu
Indeed, that is the piece I missed completely! Glad that I didn't try to invent 
wheels.
Thanks,
Zhu

-Original Message-
From: Ben Bolker  
Sent: Tuesday, July 21, 2020 3:58 PM
To: luke-tier...@uiowa.edu; Wang, Zhu 
Cc: John P. Nolan ; r-package-devel@r-project.org
Subject: Re: [External] Re: [R-pkg-devel] incomplete gamma function Fortran 
subroutine

   Interesting.  It looks like the way to make use of this is to combine the 
information in section 6.7.1 ("Distribution functions", including pgamma ...) 
with section 6.6 "Calling C from Fortran and vice versa" ?

On 7/21/20 4:33 PM, luke-tier...@uiowa.edu wrote:
> Looking at this section of WRE may help:
>
> https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Numerical
> -analysis-subroutines
>
>
> Best,
>
> luke
>
> On Tue, 21 Jul 2020, Wang, Zhu wrote:
>
>> Thanks to Ben and John. Perhaps the program should call pgamma in R 
>> and pass the number to Fortran. Calling some Fortran subroutines 
>> older than R can trigger concerns when submitting the package to the 
>> CRAN.
>>
>> Best,
>> Zhu
>>
>> -Original Message-
>> From: John P. Nolan 
>> Sent: Tuesday, July 21, 2020 1:43 PM
>> To: Wang, Zhu ; Ben Bolker ; 
>> r-package-devel@r-project.org
>> Subject: RE: [R-pkg-devel] incomplete gamma function Fortran 
>> subroutine
>>
>> As others have said, built-in function pgamma is a (normalized) 
>> version of the incomplete gamma function!   John
>>
>> -Original Message-
>> From: R-package-devel  On 
>> Behalf Of Wang, Zhu
>> Sent: Tuesday, July 21, 2020 2:16 PM
>> To: Ben Bolker ; r-package-devel@r-project.org
>> Subject: Re: [R-pkg-devel] incomplete gamma function Fortran 
>> subroutine
>>
>> External Email: Use caution with links and attachments.
>>
>> Sorry for not making myself clear: The Fortran subroutine in an R 
>> package needs to call incomplete gamma function.
>>
>> -Original Message-
>> From: R-package-devel  On 
>> Behalf Of Ben Bolker
>> Sent: Tuesday, July 21, 2020 12:54 PM
>> To: r-package-devel@r-project.org
>> Subject: Re: [R-pkg-devel] incomplete gamma function Fortran 
>> subroutine
>>
>>     Is there a reason not to use pgamma(), possibly adjusted by a 
>> (de-)normalizing constant?   (See detailed notes in ?pgamma)
>>
>> On 7/21/20 1:44 PM, Wang, Zhu wrote:
>>> Hello,
>>>
>>> In an R function within a package, I would like to call a Fortran 
>>> subroutine to compute lower gamma function. Any advice will be 
>>> appreciated.
>>>
>>> Thanks!
>>>
>>> Zhu Wang
>>>
>>>   [[alternative HTML version deleted]]
>>>
>>> __
>>> R-package-devel@r-project.org mailing list 
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_ma
>>> il
>>> man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
>>> =7 
>>> rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pm
>>> vi 
>>> Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
>>
>> __
>> R-package-devel@r-project.org mailing list 
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mai
>> lman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
>> =7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1P
>> mviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0
>> = __
>> R-package-devel@r-project.org mailing list 
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mai
>> lman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
>> =7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1P
>> mviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0
>> = __
>> R-package-devel@r-project.org mailing list 
>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>>
>
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Steven Scott
You can often find this kind of code on netlib.org.  Just include it with
the fortran code in your package.

On Tue, Jul 21, 2020 at 11:22 AM Wang, Zhu  wrote:

> Sorry for not making myself clear: The Fortran subroutine in an R package
> needs to call incomplete gamma function.
>
> -Original Message-
> From: R-package-devel  On Behalf
> Of Ben Bolker
> Sent: Tuesday, July 21, 2020 12:54 PM
> To: r-package-devel@r-project.org
> Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine
>
>  Is there a reason not to use pgamma(), possibly adjusted by a
> (de-)normalizing constant?   (See detailed notes in ?pgamma)
>
> On 7/21/20 1:44 PM, Wang, Zhu wrote:
> > Hello,
> >
> > In an R function within a package, I would like to call a Fortran
> subroutine to compute lower gamma function. Any advice will be appreciated.
> >
> > Thanks!
> >
> > Zhu Wang
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-package-devel@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] [External] Re: incomplete gamma function Fortran subroutine

2020-07-21 Thread luke-tierney

Looking at this section of WRE may help:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Numerical-analysis-subroutines

Best,

luke

On Tue, 21 Jul 2020, Wang, Zhu wrote:


Thanks to Ben and John. Perhaps the program should call pgamma in R and pass 
the number to Fortran. Calling some Fortran subroutines older than R can 
trigger concerns when submitting the package to the CRAN.

Best,
Zhu

-Original Message-
From: John P. Nolan 
Sent: Tuesday, July 21, 2020 1:43 PM
To: Wang, Zhu ; Ben Bolker ; 
r-package-devel@r-project.org
Subject: RE: [R-pkg-devel] incomplete gamma function Fortran subroutine

As others have said, built-in function pgamma is a (normalized) version of the 
incomplete gamma function!   John

-Original Message-
From: R-package-devel  On Behalf Of 
Wang, Zhu
Sent: Tuesday, July 21, 2020 2:16 PM
To: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

External Email: Use caution with links and attachments.

Sorry for not making myself clear: The Fortran subroutine in an R package needs 
to call incomplete gamma function.

-Original Message-
From: R-package-devel  On Behalf Of Ben 
Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:

Hello,

In an R function within a package, I would like to call a Fortran subroutine to 
compute lower gamma function. Any advice will be appreciated.

Thanks!

Zhu Wang

  [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7
rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pmvi
Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=


__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



--
Luke Tierney
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa  Phone: 319-335-3386
Department of Statistics andFax:   319-335-3017
   Actuarial Science
241 Schaeffer Hall  email:   luke-tier...@uiowa.edu
Iowa City, IA 52242 WWW:  http://www.stat.uiowa.edu

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


Re: [R-pkg-devel] [External] Re: incomplete gamma function Fortran subroutine

2020-07-21 Thread Ben Bolker
  I didn't find it until I said "before I compose a snarky reply to the 
list I'd better search for "Fortran" through *all* of WRE to make sure 
it's not there somewhere ..."


On 7/21/20 5:01 PM, Wang, Zhu wrote:

Indeed, that is the piece I missed completely! Glad that I didn't try to invent 
wheels.
Thanks,
Zhu

-Original Message-
From: Ben Bolker 
Sent: Tuesday, July 21, 2020 3:58 PM
To: luke-tier...@uiowa.edu; Wang, Zhu 
Cc: John P. Nolan ; r-package-devel@r-project.org
Subject: Re: [External] Re: [R-pkg-devel] incomplete gamma function Fortran 
subroutine

    Interesting.  It looks like the way to make use of this is to combine the information in 
section 6.7.1 ("Distribution functions", including pgamma ...) with section 6.6 
"Calling C from Fortran and vice versa" ?

On 7/21/20 4:33 PM, luke-tier...@uiowa.edu wrote:

Looking at this section of WRE may help:

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Numerical
-analysis-subroutines


Best,

luke

On Tue, 21 Jul 2020, Wang, Zhu wrote:


Thanks to Ben and John. Perhaps the program should call pgamma in R
and pass the number to Fortran. Calling some Fortran subroutines
older than R can trigger concerns when submitting the package to the
CRAN.

Best,
Zhu

-Original Message-
From: John P. Nolan 
Sent: Tuesday, July 21, 2020 1:43 PM
To: Wang, Zhu ; Ben Bolker ;
r-package-devel@r-project.org
Subject: RE: [R-pkg-devel] incomplete gamma function Fortran
subroutine

As others have said, built-in function pgamma is a (normalized)
version of the incomplete gamma function!   John

-Original Message-
From: R-package-devel  On
Behalf Of Wang, Zhu
Sent: Tuesday, July 21, 2020 2:16 PM
To: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran
subroutine

External Email: Use caution with links and attachments.

Sorry for not making myself clear: The Fortran subroutine in an R
package needs to call incomplete gamma function.

-Original Message-
From: R-package-devel  On
Behalf Of Ben Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran
subroutine

     Is there a reason not to use pgamma(), possibly adjusted by a
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:

Hello,

In an R function within a package, I would like to call a Fortran
subroutine to compute lower gamma function. Any advice will be
appreciated.

Thanks!

Zhu Wang

   [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_ma
il
man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
=7
rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pm
vi
Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=

__
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mai
lman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1P
mviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0
= __
R-package-devel@r-project.org mailing list
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mai
lman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q
=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1P
mviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0
= __
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



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


Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

2020-07-21 Thread Wang, Zhu
Thanks to Ben and John. Perhaps the program should call pgamma in R and pass 
the number to Fortran. Calling some Fortran subroutines older than R can 
trigger concerns when submitting the package to the CRAN.

Best,
Zhu

-Original Message-
From: John P. Nolan  
Sent: Tuesday, July 21, 2020 1:43 PM
To: Wang, Zhu ; Ben Bolker ; 
r-package-devel@r-project.org
Subject: RE: [R-pkg-devel] incomplete gamma function Fortran subroutine

As others have said, built-in function pgamma is a (normalized) version of the 
incomplete gamma function!   John

-Original Message-
From: R-package-devel  On Behalf Of 
Wang, Zhu
Sent: Tuesday, July 21, 2020 2:16 PM
To: Ben Bolker ; r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

External Email: Use caution with links and attachments.

Sorry for not making myself clear: The Fortran subroutine in an R package needs 
to call incomplete gamma function.

-Original Message-
From: R-package-devel  On Behalf Of Ben 
Bolker
Sent: Tuesday, July 21, 2020 12:54 PM
To: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] incomplete gamma function Fortran subroutine

 Is there a reason not to use pgamma(), possibly adjusted by a 
(de-)normalizing constant?   (See detailed notes in ?pgamma)

On 7/21/20 1:44 PM, Wang, Zhu wrote:
> Hello,
>
> In an R function within a package, I would like to call a Fortran subroutine 
> to compute lower gamma function. Any advice will be appreciated.
>
> Thanks!
>
> Zhu Wang
>
>   [[alternative HTML version deleted]]
>
> __
> R-package-devel@r-project.org mailing list 
> https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mail
> man_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7
> rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1Pmvi
> Z_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=

__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list 
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dpackage-2Ddevel=DwIGaQ=U0G0XJAMhEk_X0GAGzCL7Q=7rQvU8hscCTWlvO-F5wI2-2eTiW40XI5qUKda0AnbG0=Y5sTjoEyQhEnvYqP-rmi1PmviZ_5jj7ur9P8ujvLiBc=w0p6b_yBQ1jDH3amMKQGvmEKYJD-BAid_CphFO37yu0=
__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Cartograflow package

2020-07-21 Thread cartograf...@gmail.com
HelloYesterday a new version of cartograflow v1.0.3 was updated on the crank.  
Everything seems to be OK.
However, when I write in help cartograflow I don't see the thumbnail with the 
different possibilities of visualization: pdf, HTML ...
Is this normal?
Thank you in advance for your answer
Sylvain
[[alternative HTML version deleted]]

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


Re: [R-pkg-devel] os/x compiled w/ openmp?

2020-07-21 Thread Ivan Krylov
On Mon, 13 Jul 2020 10:14:14 -0400
Joshua N Pritikin  wrote:

> Is this the best place to ask?

R-SIG-Mac [*] is probably a better place for this. The short answer is
that OpenMP support has been dropped from the compiler supplied with
macOS, but there are workarounds [**].

-- 
Best regards,
Ivan

[*] https://stat.ethz.ch/mailman/listinfo/r-sig-mac

[**]
https://ryanhomer.github.io/posts/build-openmp-macos-catalina-complete

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


[R-pkg-devel] os/x compiled w/ openmp?

2020-07-21 Thread Joshua N Pritikin


Has anybody managed to create binary packages for os/x with openmp 
enabled?

Is this the best place to ask?

Our working non-openmp enabled build is here,

https://travis-ci.org/github/OpenMx/OpenMx/jobs/706741686

Thank you.

-- 
Joshua N. Pritikin, Ph.D.
Virginia Institute for Psychiatric and Behavioral Genetics
Virginia Commonwealth University
PO Box 980126
800 E Leigh St, Biotech One, Suite 1-133
Richmond, VA 23219
http://exuberant-island.surge.sh

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