[Rqda-commits] r50 - pkg pkg/R pkg/man www
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Dec 18 10:35:26 CET 2008
Author: wincent
Date: 2008-12-18 10:35:25 +0100 (Thu, 18 Dec 2008)
New Revision: 50
Added:
pkg/man/CrossCodes.rd
Modified:
pkg/ChangeLog
pkg/DESCRIPTION
pkg/R/Setting.R
pkg/R/relation.R
pkg/R/root_gui.R
pkg/man/RQDA-package.Rd
www/ChangeLog.txt
Log:
0.1.6 RC3
Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/ChangeLog 2008-12-18 09:35:25 UTC (rev 50)
@@ -1,3 +1,7 @@
+2008-12-17 (as version 0.1.6RC3)
+ * Rename CrossTable to CrossTwo
+ * New function of CrossCode
+
2008-12-17
* Improve the relation function and revise MarkCodeFun accordingly.
* New function of CrossTable for inter-relationship between codes (The name of it may change in the future).
Modified: pkg/DESCRIPTION
===================================================================
--- pkg/DESCRIPTION 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/DESCRIPTION 2008-12-18 09:35:25 UTC (rev 50)
@@ -1,8 +1,8 @@
Package: RQDA
Type: Package
Title: Qualitative Data Analysis
-Version: 0.1.5-45
-Date: 2008-12-12
+Version: 0.1.6
+Date: 2008-12-18
Author: HUANG Ronggui
Maintainer: HUANG Ronggui <ronggui.huang at gmail.com>
Depends: R (>= 2.5.0), DBI, RSQLite, RGtk2, gWidgets, gWidgetsRGtk2
Modified: pkg/R/Setting.R
===================================================================
--- pkg/R/Setting.R 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/R/Setting.R 2008-12-18 09:35:25 UTC (rev 50)
@@ -21,7 +21,7 @@
),
list(name = "BOM",
label = "BOM",
- type = "gcombobox",width=width,
+ type = "gcombobox",## width=width,
items = c(FALSE, TRUE)
),
list(name = "fore.col",
Modified: pkg/R/relation.R
===================================================================
--- pkg/R/relation.R 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/R/relation.R 2008-12-18 09:35:25 UTC (rev 50)
@@ -56,7 +56,7 @@
}
}
-CrossTable <- function(cid1, cid2,data,relation=c("overlap","inclusion","exact","proximity"))
+CrossTwo <- function(cid1, cid2,data,relation=c("overlap","inclusion","exact","proximity"),...)
{
## cid1 and cid2 is length-1 numeric, represents the id of codes
## data is return by GetCodingTable.
@@ -83,10 +83,27 @@
ans
}
-#Cross <- function(data=GetCodingTable(),type){
-#cidList <- as.numeric(names(table(data$cid)))
-#ans <- matrix(nrow=length(cidList), ncol=length(cidList),dimnames=list(cidList,cidList))
-#for (
-#CrossTable(1,4,dat)
-#}
+CrossCode <- function(relation=c("overlap","inclusion","exact","proximity"),codeList=NULL,data=GetCodingTable(),print=TRUE,...){
+## codeList is character vector of codes.
+ if (nrow(data)==0) {
+ stop("No coding in this project.")
+ } else{
+ Cid_Name <- unique(data[,c("cid","codename")])
+ if (is.null(codeList)) codeList <- gselect.list(Cid_Name$codename,multiple=TRUE)
+ if (length(codeList)<2) {
+ stop("The codeList should be a vector of length 2 or abvoe.")
+ } else {
+ cidList <- Cid_Name$cid[which(Cid_Name$codename %in% codeList)]
+ relation <- match.arg(relation)
+ ans <- matrix(nrow=length(codeList), ncol=length(codeList),dimnames=list(codeList,cidList))
+ for (i in 1:length(codeList)){
+ for (j in i:length(codeList)){
+ ans[i,j] <- CrossTwo(cidList[i],cidList[j],data=data,relation=relation)
+ }
+ }
+ if (print) {print(ans,na.print="")}
+ invisible(ans)
+ }
+ }
+}
Modified: pkg/R/root_gui.R
===================================================================
--- pkg/R/root_gui.R 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/R/root_gui.R 2008-12-18 09:35:25 UTC (rev 50)
@@ -36,7 +36,7 @@
glabel(
"Author: <ronggui.huang at gmail.com>\n
License: New style BSD License\n
-Version: 0.1.6 RC2\n",
+Version: 0.1.6 RC3\n",
container=.proj_gui
)
Added: pkg/man/CrossCodes.rd
===================================================================
--- pkg/man/CrossCodes.rd (rev 0)
+++ pkg/man/CrossCodes.rd 2008-12-18 09:35:25 UTC (rev 50)
@@ -0,0 +1,49 @@
+\name{CrossCode}
+\alias{CrossCode}
+\alias{CrossTwo}
+\docType{data}
+\title{ Inter-codes relationship}
+\description{
+ Return a matrix, give a summary of inter-codes relationship.
+}
+\usage{
+CrossCode(relation=c("overlap","inclusion","exact","proximity"),codeList=NULL,data=GetCodingTable(),print=TRUE,...)
+
+CrossTwo(cid1, cid2,data,relation=c("overlap","inclusion","exact","proximity"),...)
+}
+\arguments{
+ \item{relation}{The relation between codes}
+ \item{codeList}{A character vector, the codes list on which the inter-code relationship is based}
+ \item{data}{Data frame return by \code{GetCodingTable},may be subset of the full coding table}
+ \itme{print}{When TRUE, print the results automatically}
+ \item{cid1}{Length-1 code id. It is numeric.}
+ \item{cid2}{Length-1 code id. It is numeric.}
+ \item{\dots}{ \code{\dots} is not used yet.}
+}
+\details{
+ The inter-codes relationship calculation is based on the relationship
+ between the associated codings of the codes.
+
+ Giving the code name list (a character list), \code{CrossCode} returns
+ the inter-relationship of 2 or more than 2 codes. \code{CrossCode}
+ make heavy use of for loops, so it may takes a while to get the result
+ when the coding table is large.
+
+ \code{CrossTwo} returns the summary of inter-codes relationship of two
+ codes based on the code id (each code id is a length-1 integer vector).
+
+}
+\value{
+For \code{CrossCode}, it is a matrix. The upper matrix contains the
+number of codings fitting the relation between the respective two
+codes. the lower matrix is all NA. rownames of the matrix is the name of
+the codes , and the colnames of the matrix is the corresponding id of codes.
+
+
+For \code{CrossCodes}, it is a numeric vector.
+}
+\examples{
+\dontrun{
+CrossCodes()
+}
+}
Modified: pkg/man/RQDA-package.Rd
===================================================================
--- pkg/man/RQDA-package.Rd 2008-12-17 16:31:57 UTC (rev 49)
+++ pkg/man/RQDA-package.Rd 2008-12-18 09:35:25 UTC (rev 50)
@@ -12,7 +12,7 @@
\tabular{ll}{
Package: \tab RQDA\cr
Type: \tab Package\cr
-Version: \tab 0.1.5\cr
+Version: \tab 0.1.6RC3\cr
Date: \tab 2008-12-06\cr
Depends: \tab DBI, RSQLite, RGtk2, gWidgets, gWidgetsRGtk2\cr
License: \tab New style BSD License\cr
Modified: www/ChangeLog.txt
===================================================================
--- www/ChangeLog.txt 2008-12-17 16:31:57 UTC (rev 49)
+++ www/ChangeLog.txt 2008-12-18 09:35:25 UTC (rev 50)
@@ -1,3 +1,24 @@
+2008-12-17 (as version 0.1.6RC3)
+ * Rename CrossTable to CrossTwo
+ * New function of CrossCode
+
+2008-12-17
+ * Improve the relation function and revise MarkCodeFun accordingly.
+ * New function of CrossTable for inter-relationship between codes (The name of it may change in the future).
+
+2008-12-15
+ * Add help of GetCodingTable.
+ * Fix bugs of "Web Search-Baidu" and "Web Search-Sohu" of the case popup menu (now works for UTF-8 locale).
+ * Fix bugs of "Add to case/file category" of the fils popup menu.
+
+2008-12-14
+ * Add help of SearchFiles and GetFileId.
+ * Change the default of ask argument of undelete to TRUE.
+
+2008-12-13
+ * New function of gselect.list, gtk version of select.list (Thanks John).
+ * Add help of SummaryCoding, improve help of write.FileList.
+
2008-12-12
* Fix bugs of SortByTime(), now should work for R < 2.8.0. Fix bug of GetCodingTable and SummaryCoding.
* New function of RunOnSelected. Use it to replace select.list.
More information about the Rqda-commits
mailing list