[Rcpp-commits] r3854 - in pkg/Rcpp: . inst/include/Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 29 14:37:32 CET 2012
Author: edd
Date: 2012-10-29 14:37:32 +0100 (Mon, 29 Oct 2012)
New Revision: 3854
Modified:
pkg/Rcpp/ChangeLog
pkg/Rcpp/inst/include/Rcpp/Rmath.h
Log:
some more R Rmath wrappers
Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog 2012-10-29 12:17:53 UTC (rev 3853)
+++ pkg/Rcpp/ChangeLog 2012-10-29 13:37:32 UTC (rev 3854)
@@ -1,3 +1,7 @@
+2012-10-29 Dirk Eddelbuettel <edd at debian.org>
+
+ * inst/include/Rcpp/Rmath.h: More Rmath functions
+
2012-10-29 Romain Francois <romain at r-enthusiasts.com>
* R/Module.R: Taking care of a check warning
@@ -2,6 +6,6 @@
* include/Rcpp/module/macros.h: adding RCPP_EXPOSED_CLASS_NODECL
- * include/Rcpp/Module.h: introducing convert_to to facilitate conversion to
- other class.
- * R/Module.R: Methods registered internally with convert_to will generate
- the appropriate as S4 method.
+ * include/Rcpp/Module.h: introducing convert_to to facilitate
+ conversion to other class.
+ * R/Module.R: Methods registered internally with convert_to will
+ generate the appropriate as S4 method.
Modified: pkg/Rcpp/inst/include/Rcpp/Rmath.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Rmath.h 2012-10-29 12:17:53 UTC (rev 3853)
+++ pkg/Rcpp/inst/include/Rcpp/Rmath.h 2012-10-29 13:37:32 UTC (rev 3854)
@@ -80,6 +80,24 @@
inline double qnchisq(double p, double df, double ncp, int lt, int lg) { return ::Rf_qnchisq(p, df, ncp, lt, lg); }
inline double rnchisq(double df, double lb) { return ::Rf_rnchisq(df, lb); }
+ /* F Distibution */
+ inline double df(double x, double df1, double df2, int lg) { return ::Rf_df(x, df1, df2, lg); }
+ inline double pf(double x, double df1, double df2, int lt, int lg) { return ::Rf_pf(x, df1, df2, lt, lg); }
+ inline double qf(double p, double df1, double df2, int lt, int lg) { return ::Rf_qf(p, df1, df2, lt, lg); }
+ inline double rf(double df1, double df2) { return ::Rf_rf(df1, df2); }
+
+ /* Student t Distibution */
+ inline double dt(double x, double n, int lg) { return ::Rf_dt(x, n, lg); }
+ inline double pt(double x, double n, int lt, int lg) { return ::Rf_pt(x, n, lt, lg); }
+ inline double qt(double p, double n, int lt, int lg) { return ::Rf_qt(p, n, lt, lg); }
+ inline double rt(double n) { return ::Rf_rt(n); }
+
+ /* Binomial Distribution */
+ inline double dbinom(double x, double n, double p, int lg) { return ::Rf_dbinom(x, n, p, lg); }
+ inline double pbinom(double x, double n, double p, int lt, int lg) { return ::Rf_pbinom(x, n, p, lt, lg); }
+ inline double qbinom(double p, double n, double m, int lt, int lg) { return ::Rf_qbinom(p, n, m, lt, lg); }
+ inline double rbinom(double n, double p) { return ::Rf_rbinom(n, p); }
+
}
#endif
More information about the Rcpp-commits
mailing list