[Desire-commits] r21 - packages/loglognorm/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed May 28 00:26:43 CEST 2008


Author: olafm
Date: 2008-05-28 00:26:43 +0200 (Wed, 28 May 2008)
New Revision: 21

Modified:
   packages/loglognorm/R/loglognorm.R
Log:
* FIX: Incorrect order of parameters passed to C function mloglognorm


Modified: packages/loglognorm/R/loglognorm.R
===================================================================
--- packages/loglognorm/R/loglognorm.R	2008-05-21 12:10:49 UTC (rev 20)
+++ packages/loglognorm/R/loglognorm.R	2008-05-27 22:26:43 UTC (rev 21)
@@ -21,14 +21,14 @@
   .Call("qloglognorm", runif(n), mean=mean, sd=sd, PACKAGE="loglognorm")
 
 mloglognorm <- function(moment, mean, sd)
-  .Call("mloglognorm", mean, sd, moment, PACKAGE="loglognorm")
+  .Call("mloglognorm", moment,  mean, sd, PACKAGE="loglognorm")
 
 eloglognorm <- function(mean, sd)
-  .Call("mloglognorm", mean, sd, rep(1, length(mean)), PACKAGE="loglognorm")
+  .Call("mloglognorm", 1, mean, sd, PACKAGE="loglognorm")
 
 vloglognorm <- function(mean, sd) {
-  m1 <- mloglognorm(rep(1, length(mean)), mean, sd)
-  m2 <- mloglognorm(rep(2, length(mean)), mean, sd)
+  m1 <- mloglognorm(1, mean, sd)
+  m2 <- mloglognorm(2, mean, sd)
   return (m2 - m1^2)
 }
 



More information about the Desire-commits mailing list