[Qca-commits] r12 - in pkg: . R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 23 13:44:37 CEST 2014


Author: dusadrian
Date: 2014-06-23 13:44:37 +0200 (Mon, 23 Jun 2014)
New Revision: 12

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/is.print.R
   pkg/R/superSubset.R
   pkg/R/truthTable.R
   pkg/R/verifyQCA.R
   pkg/man/QCA-internal.Rd
   pkg/man/QCA.package.Rd
   pkg/man/superSubset.Rd
Log:
capture unnecessary (but probably useful and more informative) errors

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/DESCRIPTION	2014-06-23 11:44:37 UTC (rev 12)
@@ -1,6 +1,6 @@
 Package: QCA
-Version: 1.1-3.1
-Date: 2014-06-16
+Version: 1.1-3.2
+Date: 2014-06-23
 Title: A Package for Qualitative Comparative Analysis
 Authors at R: c(person("Adrian", "Dusa", role = c("aut", "cre"),
                       email = "dusa.adrian at unibuc.ro"),

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/NAMESPACE	2014-06-23 11:44:37 UTC (rev 12)
@@ -23,6 +23,7 @@
     is.pof,
     is.qca,
     is.tt,
+    is.sS,
     pof,
     prettyString,
     prettyTable,
@@ -33,7 +34,7 @@
     print.qca,
     print.mqca,
     print.pic,
-    print.ss,
+    print.sS,
     print.tt,
     rowDominance,
     solveChart,

Modified: pkg/R/is.print.R
===================================================================
--- pkg/R/is.print.R	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/R/is.print.R	2014-06-23 11:44:37 UTC (rev 12)
@@ -26,6 +26,13 @@
 
 
 
+`is.sS` <-
+function(x) {
+    inherits(x, "sS")
+}
+
+
+
 `print.tt` <-
 function(x, ...) {
     
@@ -831,7 +838,7 @@
 
 
 
-`print.ss` <-
+`print.sS` <-
 function(x, ...) {
     other.args <- list(...)
     PRI <- FALSE

Modified: pkg/R/superSubset.R
===================================================================
--- pkg/R/superSubset.R	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/R/superSubset.R	2014-06-23 11:44:37 UTC (rev 12)
@@ -221,7 +221,7 @@
     if (PRI) {
         out.list$PRI <- PRI
     }
-    return(structure(out.list, class="ss"))
+    return(structure(out.list, class="sS"))
 }
 
 

Modified: pkg/R/truthTable.R
===================================================================
--- pkg/R/truthTable.R	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/R/truthTable.R	2014-06-23 11:44:37 UTC (rev 12)
@@ -35,12 +35,12 @@
         conditions <- names(data)[-which(names(data) == outcome)]
     }
     
-    data <- data[, c(conditions, outcome)]
-    
     if (!via.pof) {
         verify.tt(data, outcome, conditions, complete, show.cases, incl.cut1, incl.cut0, inf.test)
     }
     
+    data <- data[, c(conditions, outcome)]
+    
     if (incl.cut0 > incl.cut1) {
         incl.cut0 <- incl.cut1
     }

Modified: pkg/R/verifyQCA.R
===================================================================
--- pkg/R/verifyQCA.R	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/R/verifyQCA.R	2014-06-23 11:44:37 UTC (rev 12)
@@ -77,6 +77,16 @@
 `verify.tt` <-
 function(data, outcome = "", conditions = c(""), complete = FALSE, show.cases = FALSE, incl.cut1 = 1, incl.cut0 = 1, inf.test) {
     
+    if (class(data) != "data.frame") {
+        cat("\n")
+        stop(paste("You have to provide a data frame, the current \"data\" argument contains an object\n",
+                   "       of class \"", class(data), "\"",
+                   ifelse(class(data) == "sS", ", created by superSubset()", ""),
+                   ifelse(class(data) == "tt", ", created by truthTable()", ""),
+                   ifelse(class(data) == "pof", ", created by pof()", ""),
+        ".\n\n", sep=""), call. = FALSE)
+    }
+    
     if (is.tt(data)) {
         data <- data$initial.data
     }

Modified: pkg/man/QCA-internal.Rd
===================================================================
--- pkg/man/QCA-internal.Rd	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/man/QCA-internal.Rd	2014-06-23 11:44:37 UTC (rev 12)
@@ -18,7 +18,7 @@
 \alias{print.pof}
 \alias{print.qca}
 \alias{print.mqca}
-\alias{print.ss}
+\alias{print.sS}
 \alias{print.tt}
 \alias{rowDominance}
 \alias{sortVector}

Modified: pkg/man/QCA.package.Rd
===================================================================
--- pkg/man/QCA.package.Rd	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/man/QCA.package.Rd	2014-06-23 11:44:37 UTC (rev 12)
@@ -60,8 +60,8 @@
     \tabular{ll}{
     Package: \tab QCA\cr
     Type:    \tab Package\cr
-    Version: \tab 1.1-3.1\cr
-    Date:    \tab 2014-06-16\cr
+    Version: \tab 1.1-3.2\cr
+    Date:    \tab 2014-06-23\cr
     License: \tab GPL (>= 2)\cr
     }
 }

Modified: pkg/man/superSubset.Rd
===================================================================
--- pkg/man/superSubset.Rd	2014-06-16 08:15:30 UTC (rev 11)
+++ pkg/man/superSubset.Rd	2014-06-23 11:44:37 UTC (rev 12)
@@ -1,5 +1,6 @@
 \name{superSubset}
 \alias{superSubset}
+\alias{is.sS}
 
 \title{Find Superset and Subset Relations}
 
@@ -13,6 +14,8 @@
 superSubset(data, outcome = "", neg.out = FALSE, conditions = c(""), 
             relation = "nec", incl.cut = 1, cov.cut = 0, 
             use.tilde = FALSE, use.letters = FALSE, ...)
+
+is.sS(x)
 }
 
 \arguments{
@@ -29,6 +32,7 @@
   \item{use.letters}{Logical, use simple letters instead of original variable
         names.}
   \item{...}{Other arguments for backward compatibility.}
+  \item{x}{An object of class "sS".}
 }
 
 \details{



More information about the Qca-commits mailing list