[Qca-commits] r37 - in pkg: . R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Sep 9 07:28:32 CEST 2014
Author: dusadrian
Date: 2014-09-09 07:28:32 +0200 (Tue, 09 Sep 2014)
New Revision: 37
Modified:
pkg/DESCRIPTION
pkg/R/eqmcc.R
pkg/R/is.print.R
pkg/R/onAttach.R
pkg/inst/ChangeLog
pkg/man/QCA.package.Rd
Log:
Small improvements
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/DESCRIPTION 2014-09-09 05:28:32 UTC (rev 37)
@@ -1,6 +1,6 @@
Package: QCA
-Version: 1.1-3.2
-Date: 2014-06-26
+Version: 1.1-3.3
+Date: 2014-09-09
Title: QCA: 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/R/eqmcc.R
===================================================================
--- pkg/R/eqmcc.R 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/R/eqmcc.R 2014-09-09 05:28:32 UTC (rev 37)
@@ -5,7 +5,7 @@
omit = c(), dir.exp = c(), details = FALSE, show.cases = FALSE,
inf.test = c(""), use.tilde = FALSE, use.letters = FALSE, ...) {
- m2 <- FALSE # just a test
+ m2 <- FALSE
metacall <- match.call()
@@ -168,6 +168,12 @@
excl.matrix <- matrix(as.numeric(excl.matrix), ncol=length(noflevels)) + 1
subset.tt <- tt$tt[, "OUT"] %in% explain
+
+ if (all(!subset.tt)) {
+ cat("\n")
+ stop(paste("None of the values in OUT is explained. Please check the truth table.\n\n", sep=""), call. = FALSE)
+ }
+
inputt <- as.matrix(tt$tt[subset.tt, seq(length(noflevels))])
rownms <- rownames(inputt)
inputt <- matrix(as.numeric(inputt), ncol=length(noflevels)) + 1
Modified: pkg/R/is.print.R
===================================================================
--- pkg/R/is.print.R 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/R/is.print.R 2014-09-09 05:28:32 UTC (rev 37)
@@ -581,7 +581,7 @@
max.chars <- 1
if (x$relation %in% c("sufficiency", "suf")) {
if (ncol(incl.cov) > (3 + any(grepl("PRI", colnames(incl.cov))))) {
- first.printed.row <- paste(c(rep(" ", nchar.rownames + nchar.nrow + 25 - 7*!PRI), rep("-", 7*(ncol(incl.cov) - (2 + valid.cov.u) + !PRI) - 2)), collapse="")
+ first.printed.row <- paste(c(rep(" ", nchar.rownames + nchar.nrow + 25 - 7 * !PRI), rep("-", 7 * (ncol(incl.cov) - (2 + valid.cov.u) + !PRI) - 2)), collapse="")
max.chars <- nchar(first.printed.row)
}
}
@@ -593,7 +593,7 @@
max.chars <- max.nchar.cases
}
- sep.row <- paste(rep("-", nchar.rownames + 7*ncol(incl.cov) + ifelse(cases.column, max.nchar.cases, 0) + nchar.nrow), collapse="")
+ sep.row <- paste(rep("-", nchar.rownames + 7 * ncol(incl.cov) + ifelse(cases.column, max.nchar.cases, 0) + nchar.nrow), collapse="")
# then compare again the max.chars with a "normal" length of a line
if (nchar(sep.row) < line.length) {
@@ -608,7 +608,7 @@
colnames.row <- cat(paste(c(paste(rep(" ", nchar.rownames + nchar.nrow + 2), collapse=""), format(colnames(incl.cov))), collapse=" "))
cat(paste(colnames.row, ifelse(cases.column, " cases", ""), sep=""), "\n")
- sep.row <- paste(rep("-", nchar.rownames + 7*ncol(incl.cov) + ifelse(cases.column, max.nchar.cases + 2, 0) + nchar.nrow + 2), collapse="")
+ sep.row <- paste(rep("-", nchar.rownames + 7 * ncol(incl.cov) + ifelse(cases.column, max.nchar.cases + 2, 0) + nchar.nrow + 2), collapse="")
cat(sep.row, "\n")
if (essentials) {
for (i in seq(nrow(incl.cov.e))) {
@@ -648,7 +648,7 @@
}
cat(paste(c(paste(rep(" ", nchar.rownames + nchar.nrow + 2), collapse=""), colnames(incl.cov)), collapse=" "), "\n")
- sep.row <- paste(rep("-", nchar.rownames + 7*ncol(incl.cov) + nchar.nrow + 2), collapse="")
+ sep.row <- paste(rep("-", nchar.rownames + 7 * ncol(incl.cov) + nchar.nrow + 2), collapse="")
cat(sep.row, "\n")
if (essentials) {
@@ -717,9 +717,12 @@
if (chunk < chunks) {
- cat(paste(c("\n", rep(ifelse(chunk == 1, " ", "-"), nchar.rownames + nchar.nrow + 18), rep("-", 7*(ncols - 2) - 2)), collapse=""), "\n")
+ if (ncols > 3) { # quick'n'dirty hack to solve Mattia's printing error
+ cat(paste(c("\n", rep(ifelse(chunk == 1, " ", "-"), nchar.rownames + nchar.nrow + 18), rep("-", 7 * (ncols - 2) - 2)), collapse=""), "\n")
+ }
+
cat(paste(c(paste(rep(" ", nchar.rownames + nchar.nrow + 2), collapse=""), colnames(incl.cov.temp)), collapse=" "), "\n")
- sep.row <- paste(rep("-", nchar.rownames + 7*ncol(incl.cov.temp) + nchar.nrow + 2), collapse="")
+ sep.row <- paste(rep("-", nchar.rownames + 7 * ncol(incl.cov.temp) + nchar.nrow + 2), collapse="")
cat(sep.row, "\n")
if (essentials) {
@@ -743,7 +746,7 @@
cat("\n")
}
else {
- max.chars <- nchar.rownames + 7*ncol(incl.cov.temp) + nchar.nrow + 2
+ max.chars <- nchar.rownames + 7 * ncol(incl.cov.temp) + nchar.nrow + 2
sep.row <- paste(c(rep("-", max.chars)), collapse="")
if (cases.column) {
max.chars <- max.chars + max.nchar.cases
@@ -883,7 +886,7 @@
nchar.rownames <- nchar(rownames(incl.cov)[1])
cat(paste(c(paste(rep(" ", nchar.rownames + nchar(nrow(incl.cov)) + 2), collapse=""), format(colnames(incl.cov))), collapse=" "), "\n")
- sep.row <- paste(rep("-", nchar.rownames + nchar(nrow(incl.cov)) + ncol(incl.cov)*7 + 2), collapse="")
+ sep.row <- paste(rep("-", nchar.rownames + nchar(nrow(incl.cov)) + 7 * ncol(incl.cov) + 2), collapse="")
cat(sep.row, "\n")
for (i in seq(nrow(incl.cov))) {
Modified: pkg/R/onAttach.R
===================================================================
--- pkg/R/onAttach.R 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/R/onAttach.R 2014-09-09 05:28:32 UTC (rev 37)
@@ -7,7 +7,7 @@
msg <- paste("Dusa, Adrian, and Alrik Thiem.", sprintf("%s.", year),
sprintf("%s.", title), note,
- "URL: http://cran.r-project.org/package=QCA.")
+ "URL: http://cran.r-project.org/package=QCA")
msg <- paste(strwrap(msg, indent = 2, exdent = 2), collapse = "\n")
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/inst/ChangeLog 2014-09-09 05:28:32 UTC (rev 37)
@@ -13,6 +13,9 @@
o Fixed: matrix dimensions dropped in function getSolution()
o Fixed: case names assigned to incorrect PIs in function
demoChart() under some conditions (thanks to M. Vink)
+ o Fixed: very large pof() objects didn't generated an error on print
+ o Fixed: more informative error message when the truth table didn't contain
+ any explained values (thanks to Mattia Zulianello)
Version 1.1-2
o Fixed: missing data triggered an error message in function truthTable()
Modified: pkg/man/QCA.package.Rd
===================================================================
--- pkg/man/QCA.package.Rd 2014-08-11 11:33:44 UTC (rev 36)
+++ pkg/man/QCA.package.Rd 2014-09-09 05:28:32 UTC (rev 37)
@@ -23,8 +23,7 @@
Ragin and Strand 2008). The \pkg{QCA} package extends these basic variants in
different directions by implementing complementary functionality. For example,
intermediate solutions and summary statistics are also available in mvQCA (Thiem
-2014a). Note, however, that \dfn{generalized-set QCA} (Thiem 2014b) is not yet
-available.
+2014a).
As of version 0.4-5, \pkg{QCA} has offered a new function called \code{\link{eqmcc}}
(\dfn{enhanced Quine-McCluskey}; \emph{e}QMC) that finds exact solutions much
@@ -52,12 +51,6 @@
and calibrated set format are available on the COMPASSS website at
\url{http://www.compasss.org/bibdata.htm}.
-If you make use of the \pkg{QCA} package in your work, please acknowledge this,
-not least for reasons of scientific transparency. The software citation for \pkg{QCA}
-loads on attaching the package or by using the command \code{citation("QCA")} after
-having attached the package. The aforesaid command also provides a suitable BibTeX
-entry. The corresponding article citation is Thiem and Dusa (2013b).
-
How to make the most of the package's capabilities is demonstrated in detail by
Thiem and Dusa (2013c) with examples from political science (note that data sets
have been renamed). Later versions of the package than those used in Thiem and
@@ -65,14 +58,20 @@
and default settings, but backward compatibility is generally ensured. A general
comparison of \pkg{QCA}'s features with those of \pkg{fs/QCA} (Ragin and Davey
2014) and \pkg{Tosmana} (Cronqvist 2011) is provided by Thiem and Dusa (2013a).
+
+If you make use of the \pkg{QCA} package in your work, please acknowledge this,
+not least for reasons of scientific transparency. The software citation for \pkg{QCA}
+loads on attaching the package or by using the command \code{citation("QCA")} after
+having loaded the package. The aforesaid command also provides a suitable BibTeX
+entry.
}
\details{
\tabular{ll}{
Package: \tab QCA\cr
Type: \tab Package\cr
- Version: \tab 1.1-3.2\cr
- Date: \tab 2014-06-23\cr
+ Version: \tab 1.1-3.3\cr
+ Date: \tab 2014-09-09\cr
License: \tab GPL (>= 2)\cr
}
}
More information about the Qca-commits
mailing list