[Qca-commits] r22 - in pkg: . R src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 23 22:01:03 CEST 2014


Author: dusadrian
Date: 2014-07-23 22:01:02 +0200 (Wed, 23 Jul 2014)
New Revision: 22

Modified:
   pkg/DESCRIPTION
   pkg/NAMESPACE
   pkg/R/calibrate.R
   pkg/R/eqmcc.R
   pkg/R/onAttach.R
   pkg/src/m2.c
Log:
.onAttach now uses packageDescription(), which had to be imported from package utils

Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/DESCRIPTION	2014-07-23 20:01:02 UTC (rev 22)
@@ -7,7 +7,7 @@
              person("Alrik", "Thiem", role = "aut",
                     email = "alrik.thiem at unige.ch"))
 Depends: R (>= 3.0.0)
-Imports: lpSolve
+Imports: lpSolve, utils
 Suggests: VennDiagram
 Description: This package provides functions for performing Qualitative Comparative Analysis (csQCA, tQCA, mvQCA and fsQCA).
 License: GPL (>= 2)

Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/NAMESPACE	2014-07-23 20:01:02 UTC (rev 22)
@@ -52,3 +52,4 @@
     writePrimeimp,
     writeSolution)
 import(lpSolve)
+importFrom("utils", "packageDescription")

Modified: pkg/R/calibrate.R
===================================================================
--- pkg/R/calibrate.R	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/R/calibrate.R	2014-07-23 20:01:02 UTC (rev 22)
@@ -56,6 +56,8 @@
                 }
                 
                 y <- (x < thCR) + 1
+                # y is the index of the position in the vector {-1, 1}
+                
                 result <- 1/(1 + exp(-((x - thCR) * (c(1, -1)[y]*log(idm/(1 - idm))/(c(thIN, thEX)[y] - thCR)))))
                 
                 if (thresholds[1] > thresholds[3]) {

Modified: pkg/R/eqmcc.R
===================================================================
--- pkg/R/eqmcc.R	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/R/eqmcc.R	2014-07-23 20:01:02 UTC (rev 22)
@@ -679,7 +679,7 @@
     }
     
     output$relation <- relation
-    output at call <- metacall
+    output$call <- metacall
     
     return(structure(output, class="qca"))
 }

Modified: pkg/R/onAttach.R
===================================================================
--- pkg/R/onAttach.R	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/R/onAttach.R	2014-07-23 20:01:02 UTC (rev 22)
@@ -1,5 +1,13 @@
 .onAttach <- function(...) {
-    msg <- "Dusa, Adrian and Alrik Thiem (2014). QCA: A Package for Qualitative Comparative Analysis. R package version 1.1-3. URL http://CRAN.R-project.org/package=QCA"
+    
+    meta <- packageDescription("QCA")
+    year <- sub("-.*", "", meta$Date)
+    note <- sprintf("R package version %s", meta$Version)
+    
+    msg <- paste("Dusa, Adrian and Alrik Thiem", sprintf("(%s).", year),
+                 "QCA: A Package for Qualitative Comparative Analysis.",
+                  paste(note, ".", sep = ""),
+                  "URL: http://cran.r-project.org/package=QCA")
     msg <- paste(strwrap(msg, indent=2, exdent=2), collapse="\n")
     packageStartupMessage("\nPlease cite the QCA package as:\n", msg, "\n\nA complete BibTeX reference is provided by:\n  citation(\"QCA\")\n")
 }

Modified: pkg/src/m2.c
===================================================================
--- pkg/src/m2.c	2014-07-23 16:07:09 UTC (rev 21)
+++ pkg/src/m2.c	2014-07-23 20:01:02 UTC (rev 22)
@@ -6,7 +6,7 @@
 
 SEXP m2(SEXP goodbad, SEXP valents, SEXP mvector, SEXP mbase, SEXP t1g, SEXP t1b, SEXP rnofl) {
     
-    int *pmvector, *pmbase, *pt1g, *pt1b, *prnofl;
+    int *pmvector, *pmbase, *prnofl; //, *pt1b, *pt1g
     SEXP t1gc, t1bc, t2g, t2b, temp, final, tempfinal, cr, tobj, tl; // cr is current.row; tobj is a temporary object
     int i, j, k, ln, nofconditions, lt1c, lt2, newl, counter, tcounter; //ln is line.number
     int *pt1gc, *pt1bc, *pt2g, *pt2b, *ptemp, *pfinal, *ptempfinal, *pcr, *ptobj, *ptl;
@@ -41,8 +41,8 @@
     
     pmvector = INTEGER(mvector);
     pmbase = INTEGER(mbase);
-    pt1g = INTEGER(t1g);
-    pt1b = INTEGER(t1b);
+    // pt1g = INTEGER(t1g);
+    // pt1b = INTEGER(t1b);
     ptemp = INTEGER(temp);
     ptempfinal = INTEGER(tempfinal);
     pcr = INTEGER(cr);



More information about the Qca-commits mailing list