[Rqda-commits] r41 - pkg pkg/R www

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Dec 9 04:33:46 CET 2008


Author: wincent
Date: 2008-12-09 04:33:46 +0100 (Tue, 09 Dec 2008)
New Revision: 41

Modified:
   pkg/ChangeLog
   pkg/R/utils.R
   www/ChangeLog.txt
   www/documentation.html
Log:


Modified: pkg/ChangeLog
===================================================================
--- pkg/ChangeLog	2008-12-08 09:59:13 UTC (rev 40)
+++ pkg/ChangeLog	2008-12-09 03:33:46 UTC (rev 41)
@@ -1,3 +1,7 @@
+2008-12-09
+	* New functions to summary codings: SummaryCoding, GetCodingTable.
+	* Add documentation.
+	
 2008-12-08
 	* New function of OrderByTime() for computing time order explicitly.
 	* "Show Uncoded files only" popup menu will sort the uncoded file by imported time.

Modified: pkg/R/utils.R
===================================================================
--- pkg/R/utils.R	2008-12-08 09:59:13 UTC (rev 40)
+++ pkg/R/utils.R	2008-12-09 03:33:46 UTC (rev 41)
@@ -52,3 +52,61 @@
       }
     }
   }
+
+## summary coding information
+GetCodingTable <- function(){
+  ## test when any table is empty
+  if ( isIdCurrent(.rqda$qdacon)) {
+    Codings <- dbGetQuery(.rqda$qdacon,"select freecode.name as codename, freecode.id as cid, 
+            coding.cid as cid2,coding.fid as fid,source.id as fid2, source.name as filename,
+            coding.selend - coding.selfirst as CodingLength,coding.selend, coding.selfirst
+            from coding, freecode, source 
+            where coding.status==1 and freecode.id=coding.cid and coding.fid=source.id")
+    if (nrow(Codings)!=0){
+      Encoding(Codings$codename) <- Encoding(Codings$filename) <- "UTF-8"
+    }
+    if (!all (all.equal(Codings$cid,Codings$cid2),all.equal(Codings$fid,Codings$fid2))){
+      stop("Errors!") ## check to make sure the sql is correct
+    }
+    Codings
+  } else cat("Open a project first.\n")
+}
+
+SummaryCoding <- function(byFile=FALSE,...){
+  if ( isIdCurrent(.rqda$qdacon)) {
+    Codings <- GetCodingTable()
+    if (nrow(Codings)>0){
+      NumOfCoding <- table(Codings$codename,...) ## how many coding for each code
+      AvgLength <- tapply(Codings$CodingLength,Codings$codename,FUN=mean,...) # Average of words for each code
+      NumOfFile <- tapply(Codings$fid1,Codings$codename,FUN=length,...) # Number of files for each code
+      if (byFile){
+        CodingOfFile <- tapply(Codings$codename,Codings$filename,FUN=table,...) # summary of codings for each file
+      } else CodingOfFile <- NULL
+      ans <- list(NumOfCoding=NumOfCoding,AvgLength=AvgLength,NumOfFile=NumOfFile,CodingOfFile=CodingOfFile)
+      class(ans) <- "SummaryCoding"
+      ans
+    } else {
+      cat("No coding.\n")
+    }
+  } else {
+    cat("Open a project first.\n")
+  }
+}
+
+print.SummaryCoding <- function(x,...){
+  class(x)
+  if (!is.null(x$CodingOfFile)){
+    cat("----------------\n")
+    cat("Number of codings for each file.\n")
+    print(x$CodingOfFile)
+  }
+  cat("----------------\n")
+  cat("Number of codings for each code.\n")
+  print(x$NumOfCoding)
+  cat("----------------\n")
+  cat("Average number of words assciated with each code.\n\n")
+  print(x$AvgLength)
+  cat("----------------\n")
+  cat("Number of files associated with each code.\n\n")
+  print(x$NumOfFile)
+}

Modified: www/ChangeLog.txt
===================================================================
--- www/ChangeLog.txt	2008-12-08 09:59:13 UTC (rev 40)
+++ www/ChangeLog.txt	2008-12-09 03:33:46 UTC (rev 41)
@@ -1,3 +1,7 @@
+2008-12-09
+	* New functions to summary codings: SummaryCoding, GetCodingTable.
+	* Add documentation.
+	
 2008-12-08
 	* New function of OrderByTime() for computing time order explicitly.
 	* "Show Uncoded files only" popup menu will sort the uncoded file by imported time.

Modified: www/documentation.html
===================================================================
--- www/documentation.html	2008-12-08 09:59:13 UTC (rev 40)
+++ www/documentation.html	2008-12-09 03:33:46 UTC (rev 41)
@@ -27,8 +27,11 @@
 <hr>
 
 <h1><a id="user manual">User's Manual</a></h1>
-<p>Under construction (<b>contributions are more than welcome</b>).
+<p><b>Contributions are more than welcome</b>.
 
+<p><b>0. Design principle </b>
+<p>Reliability is the most important thing. In order to maximize the reliability, every change will write to the *.rqda file directly, so you don't have to manually save your project.
+
 <p><b>1. Project </b>
 <p>You can create a new project in by clicking the new project button in Project Tab. RQDA will create a *.rqda file, which is a  SQLite database. All the information (e.g. files, code list, all kinds of memo, coding, and relation between codes or between files etc.) is stored in that single file. Single *.rqda file makes backup or data migration much easier.
 
@@ -45,17 +48,28 @@
 
 <p> You can delete files. First select one file you want to delete, then click delete button in Files Tab. Similarly, you can rename the selected file name (one file per time). You can select a file, and click open button to open the file, so you can read the content of it. You can open a file by double click as well.
 
+<p> You can calculate the total number of files in a project by using R command <i>length(GetFileId())</i>, the total number of uncoded file by command <i>length(GetFileId(type="uncoded"))</i>, and number of coded file by command <i>length(GetFileId(type="coded"))</i>.
+
 <p><b>3. Coding </b>
-<p>Basically, the essence of QDA is to apply a label to a text segment. The label is usually a meaning concept in the research, which is called <b>"code"</b> here. So you have to generate a code list. You can add a code to the list by clicking add button in Codes Tab, input a code in the input window, and click OK. You can add unlimited number of codes, but you should think hard on what codes are useful in the research so to avoid overwhelming of codes. You can rename and delete a code from the code list. The operation is similar to that of files.
+<p>Basically, the essence of QDA is to apply a label to a text segment. The label is usually a meaningful concept in the research, which is called <b>"code"</b> here. So you have to generate a code list. You can add a code to the list by clicking add button in Codes Tab, input a code in the input window, and click OK. You can add unlimited number of codes, but you should think hard on what codes are useful in the research so to avoid overwhelming of codes. You can rename and delete a code from the code list. The operation is similar to that of files.
 
 <p>When you have imported a list of files and generate a code list, then you can go on the process of coding. First, you should open a file. Then you read and think, if you think some words is relevant to a code, you can apply that code to the text segment: select a code, select that text segment, and click mark button in the Codes Tab. Then you can find that text segment is highlighted with color (by default, it is blue). We call this process <b>"coding"</b>. You can undo the coding as well: select the same text segment and click Unmark button in the Codes Tab. Now, the highlight is remove, which means that you have succesfully remove that coding. 
 
-<p>If you want to see what information has been attached to a code, you can  double click a code to retrieval all the related coding to that code. Of course, you can select a code, and then click retrieval button to conduct similar operation. This process is called <b>"coding retrieval"</b>.
+<p>If you want to see what information has been attached to a code, you can  double click a code to retrieval all the related coding to that code. This process is called <b>"coding retrieval"</b>. Of course, you can select a code, and then click retrieval button to conduct similar operation. The latter method has an advantage that you can go back to the original file content by clicking the back button within the retrieved coding (though this method takes a bit more time to retrieve the coding). This method can give you a closeness with the original content and avoid, to some extent, segmentation due to coding. To get a overall statistics of coding, you can use R function SummaryCoding() to inspect the "Number of codings for each code", "Average number of words assciated with each code", "Number of files associated with each code". You can get more by GetFileId function. For more information, please refer to the help page by <i>?GetFileId</i>.
 
+
 <p><b>4. Writing memo</b>
-<p>About memo buttons in the code tab: 1. C-memo is used to attach memo to a selected code. You can select a code then click C-memo button to view/add memo. 2. C2Memo is used to attach a memo to a coded segments. In the open file, you can see the coded segments (highlighted), select one segment, and click C2Memo, you can view/add memo to that coded-segment.
+<p> Writing what you think during reading and coding is an integral part of QDA. This is called "<b>Memo writing</b>", and what you write is "<b>Memo</b>". RQDA offers different kinds of memos. For ideas apply to the whole project, you should write a project memo (project memo button in Project Tab). You can write memo about a specific file by clicking F-Memo button in Files Tab, or by cliking "File Memo" via popup memu in Files Tab. In the Codes Tab, there are two kinds of memo, the "C-memo" button is used to attach memo to a selected code. You can select a code then click "C-memo" button to view/add memo. "C2Memo" is used to attach a memo to a coding (a coded text segments). In the open file, you can see the coded segments (highlighted), select one segment, and click "C2Memo" button, you can view/add memo to that coded-segment.
 
+<p><b>5. Settings</b>
+<p> "Name of coder" is the name of the analyst. this is crucial if there are more than one analysts, and crucial for calculate the inter-coder reliability coeficient. You should always set this parameter. 
+<p>Encoding of file is the encoding of the file you want to imported. If it is ASCII file, the default "unknown" is fine. If it is other encoding, you should set it accordingly. For example, you should set it to UTF-8 if the file is in UTF-8. Note that if you save a plain text with encoding UTF-8 with using MS notepad, the notepad will add BOM (Byte order Mark, it is a 3 bite mark) in the beginning of the file, for this case, you should set BOM to TRUE.
+<p> To change the setting is simple, you change the value of each setting and then click OK button. If you want to reset to the default setting, you can just click the default button.
 
+<p><b>Warranty</b>
+<p>As a open source and free project, there is no warranty that it is fit for any particular purpose, or that it will work at all. You use RQDA solely at your own risk, and no liability can be assumed for any damage or loss incurred by your use of the software. You can learn more from the <A HREF="License.html">license</A>.
+
+
 <h1><a id="tips">Tips<a></h1>
 <br>1. Under Linux/FreeBSD, you should set the locale of R to UTF-8 to get a better support of non-English documents. In my FreeBSD box, I set the locale of R by this R command: <i>Sys.setlocale(locale = "zh_CN.UTF-8")</i>.
 <br>2. When RDQA is launched, it is better to minimize the main window of R (e.g. Rgui, Rterm, terminal from which R is launched).



More information about the Rqda-commits mailing list