[Distr-commits] r790 - branches/distr-2.4/pkg/distrSim/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Feb 20 15:07:27 CET 2012


Author: ruckdeschel
Date: 2012-02-20 15:07:27 +0100 (Mon, 20 Feb 2012)
New Revision: 790

Modified:
   branches/distr-2.4/pkg/distrSim/R/AllClasses.R
Log:
distrSim: fixed request by B.Ripley as to installed.packages in branch 2.4

Modified: branches/distr-2.4/pkg/distrSim/R/AllClasses.R
===================================================================
--- branches/distr-2.4/pkg/distrSim/R/AllClasses.R	2012-02-06 12:18:18 UTC (rev 789)
+++ branches/distr-2.4/pkg/distrSim/R/AllClasses.R	2012-02-20 14:07:27 UTC (rev 790)
@@ -40,14 +40,9 @@
 
 
 .pkgv <- as.character(
-         {if ("distrSim" %in% row.names(installed.packages()))
-             {read.dcf(file = system.file("DESCRIPTION", package = "distrSim"), 
-                       fields = "Version")
-             }else{
-              read.dcf(file = system.file("DESCRIPTION", 
-                       package = "distr"), 
-                       fields = "Version")
-          }})
+         if(all(is.na(packageDescription("distrSim"))))
+             packageVersion("distr") else packageVersion("distrSim")
+         )
 
 setClass("Dataclass",
          representation(filename = "vectororNULL",



More information about the Distr-commits mailing list