[Prob-commits] r49 - in pkg: . R man vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 19 19:42:43 CEST 2017


Author: gkerns
Date: 2017-09-19 19:42:42 +0200 (Tue, 19 Sep 2017)
New Revision: 49

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/characteristicfunctions.r
   pkg/man/CharFunc.Rd
   pkg/man/prob-package.Rd
   pkg/vignettes/charfunc.Rnw
Log:
deleted fAsianOptions dependence, and deleted charfunc.Rnw

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/DESCRIPTION	2017-09-19 17:42:42 UTC (rev 49)
@@ -1,9 +1,9 @@
 Package: prob
-Version: 1.0-0
-Date: 2017-02-15
+Version: 1.0-1
+Date: 2017-09-18
 Title: Elementary Probability on Finite Sample Spaces
 Authors at R: person(given = "G. Jay", family = "Kerns", role = c("aut", "cre", "cph"), email = "gkerns at ysu.edu")
-Depends: combinat, fAsianOptions
+Depends: combinat
 Suggests: VGAM, reshape, MASS, hypergeo
 Description:
  A framework for performing elementary probability

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/NAMESPACE	2017-09-19 17:42:42 UTC (rev 49)
@@ -1,7 +1,6 @@
 importFrom("stats", "aggregate", "dbeta", "dsignrank", "dt",
              "dweibull", "dwilcox", "integrate", "rbinom")
 importFrom("utils", "combn")
-importFrom("fAsianOptions", "kummerM", "kummerU")
 importFrom("combinat", "permn")
 
 # Export all names
@@ -9,12 +8,10 @@
 export(
 addrv,
 cards,
-cfbeta,
 cfbinom,
 cfcauchy,
 cfchisq,
 cfexp,
-cff,
 cfgamma,
 cfgeom,
 cfhyper,

Modified: pkg/R/characteristicfunctions.r
===================================================================
--- pkg/R/characteristicfunctions.r	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/R/characteristicfunctions.r	2017-09-19 17:42:42 UTC (rev 49)
@@ -3,20 +3,20 @@
 #  Copyright January 2009, G. Jay Kerns
 
 
-cfbeta <- function(t, shape1, shape2, ncp = 0){
-    if (shape1 <=0 || shape2 <=0)
-        stop("shape1, shape2 must be positive")
-    if (identical(all.equal(ncp, 0), TRUE)){
-        # require(fAsianOptions)
-        kummerM(1i*t, shape1, shape1 + shape2)
-    } else {
-        fr <- function(x) cos(t*x)*dbeta(x, shape1, shape2, ncp)
-        fi <- function(x) sin(t*x)*dbeta(x, shape1, shape2, ncp)
-        Rp <- integrate(fr, lower = 0, upper = 1)$value
-        Ip <- integrate(fi, lower = 0, upper = 1)$value
-        return( Rp + 1i*Ip )
-    }
-}
+# cfbeta <- function(t, shape1, shape2, ncp = 0){
+#     if (shape1 <=0 || shape2 <=0)
+#         stop("shape1, shape2 must be positive")
+#     if (identical(all.equal(ncp, 0), TRUE)){
+#         # require(fAsianOptions)
+#         kummerM(1i*t, shape1, shape1 + shape2)
+#     } else {
+#         fr <- function(x) cos(t*x)*dbeta(x, shape1, shape2, ncp)
+#         fi <- function(x) sin(t*x)*dbeta(x, shape1, shape2, ncp)
+#         Rp <- integrate(fr, lower = 0, upper = 1)$value
+#         Ip <- integrate(fi, lower = 0, upper = 1)$value
+#         return( Rp + 1i*Ip )
+#     }
+# }
 
 
 cfbinom <- function(t, size, prob){
@@ -44,16 +44,16 @@
     cfgamma(t, shape = 1, scale = 1/rate)
 }
 
-cff <- function(t, df1, df2, ncp, kmax = 10){
-    if (df1 <= 0 || df2 <= 0  )
-        stop("df1 and df2 must be positive")
-    # require(fAsianOptions)
-    if( identical(all.equal(ncp, 0), TRUE) ){
-        gamma((df1+df2)/2) / gamma(df2/2) * kummerU(-1i*df2*t/df1, df1/2, 1 - df2/2)
-    } else {
-        exp(-ncp/2)*sum((ncp/2)^(0:kmax)/factorial(0:kmax)* kummerM(-1i*df2*t/df1, df1/2 + 0:kmax, -df2/2))
-    }
-}
+# cff <- function(t, df1, df2, ncp, kmax = 10){
+#     if (df1 <= 0 || df2 <= 0  )
+#         stop("df1 and df2 must be positive")
+#     # require(fAsianOptions)
+#     if( identical(all.equal(ncp, 0), TRUE) ){
+#         gamma((df1+df2)/2) / gamma(df2/2) * kummerU(-1i*df2*t/df1, df1/2, 1 - df2/2)
+#     } else {
+#         exp(-ncp/2)*sum((ncp/2)^(0:kmax)/factorial(0:kmax)* kummerM(-1i*df2*t/df1, df1/2 + 0:kmax, -df2/2))
+#     }
+# }
 
 
 cfgamma <- function(t, shape, rate = 1, scale = 1/rate){

Modified: pkg/man/CharFunc.Rd
===================================================================
--- pkg/man/CharFunc.Rd	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/man/CharFunc.Rd	2017-09-19 17:42:42 UTC (rev 49)
@@ -4,12 +4,10 @@
 
 \name{CharFunc}
 \concept{characteristic function}
-\alias{cfbeta}
 \alias{cfbinom}
 \alias{cfcauchy}
 \alias{cfchisq}
 \alias{cfexp}
-\alias{cff}
 \alias{cfgamma}
 \alias{cfgeom}
 \alias{cfhyper}
@@ -34,12 +32,10 @@
 }
 
 \usage{
-cfbeta(t, shape1, shape2, ncp = 0)
 cfbinom(t, size, prob)
 cfcauchy(t, location = 0, scale = 1)
 cfchisq(t, df, ncp = 0)
 cfexp(t, rate = 1)
-cff(t, df1, df2, ncp, kmax = 10)
 cfgamma(t, shape, rate = 1, scale = 1/rate)
 cfgeom(t, prob)
 cfhyper(t, m, n, k)
@@ -58,9 +54,7 @@
 \arguments{
   \item{t}{numeric value.  Some of the above are vectorized functions.}
   \item{df}{degrees of freedom (\eqn{> 0}, maybe non-integer)}
-  \item{df1, df2}{numerator and denominator degrees of freedom, must be positive}
   \item{k}{the number of balls drawn from the urn.}
-  \item{kmax}{the number of terms in the series.}
   \item{lambda}{vector of (positive) means.}
   \item{location, scale}{location and scale parameters; scale must be positive.}
   \item{m}{the number of white balls in the urn.}
@@ -78,7 +72,6 @@
   \item{size}{number of trials (binom) or target for number of successful trials
     (nbinom).}
   \item{shape}{shape parameter, must be positive (gamma, weibull)}
-  \item{shape1, shape2}{positive parameters of the Beta distribution.}  
 }
 
 \value{

Modified: pkg/man/prob-package.Rd
===================================================================
--- pkg/man/prob-package.Rd	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/man/prob-package.Rd	2017-09-19 17:42:42 UTC (rev 49)
@@ -21,9 +21,9 @@
 \details{
 \tabular{ll}{
 Package: \tab prob\cr
-Version: \tab 1.0-0\cr
-Date: \tab 2017-02-15\cr
-Depends: \tab combinat, fAsianOptions\cr
+Version: \tab 1.0-1\cr
+Date: \tab 2017-09-18\cr
+Depends: \tab combinat\cr
 Suggests: \tab VGAM, hypergeo\cr
 LazyLoad: \tab no\cr
 License: \tab GPL version 3 or newer\cr

Modified: pkg/vignettes/charfunc.Rnw
===================================================================
--- pkg/vignettes/charfunc.Rnw	2017-02-16 03:44:29 UTC (rev 48)
+++ pkg/vignettes/charfunc.Rnw	2017-09-19 17:42:42 UTC (rev 49)
@@ -60,6 +60,7 @@
 \usepackage{babel}
 
 \begin{document}
+\SweaveOpts{concordance=TRUE}
 
 \title{Characteristic Functions in the \Rpackage{prob} package}
 



More information about the Prob-commits mailing list