Homepage of RQDA

User's Manual



User's Manual

Contributions are more than welcome.

0. Design principles

Reliability: This 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.

Capacity of file management: This package is written for my own research, aiming at analyzing newspaper reports. In this case, there are lots of files, and I have put much effect on the management and organization of files (Sorting, Show coded files only, Show uncoded files only, Show those fit the searching criterion only etc.).

Mixed methods study: RQDA aims at mixed methods study. One example is the Cases Tab, which offers possibility of Qualitative Comparative Study (see QCA3 or QCA for more).

1. Project

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.

If you have a project already, you can open it by clicking open project button. Only when a project is open can you conduct futher analysis. You can click current project button to inspect which *.rqda file you are working on.

You can back up your project by clicking backup button. For example, I am working on demo.rqda file, and click backup button, I gets a backup file named demo.rqda_17245808122008. The suffix means that the backup action happens at 17:24:58 of 8 Dec, 2008.

Before you go on, you may would like to set the "Name of coder" in Settings Tab, so you can learn who is resposible for the following actions (file import, coding etc.). You can replace "default" with your name and then click OK button.

2. Files

After open a project, you can import files by click import button in the Files Tab. By default, the file should be a plain text with encoding of ASCII, otherwise, you should set the File encoding in Settings Tab before you import files.

If you want to import a lots of files, you can use R function write.FileList() to import them. For more information about its usage, please consult to ?write.FileList. In addition, from the pop-up menu in file Tabm you can add new file directly by typing or pasting content: right-click - Add new file... - type new content or paste content - click "save to project" - input the file title and click ok. After that, you can close the "add new file" widget.

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.

You can show only a subset of files by the popup menu. For example, you can show the uncoded files only, or the coded files only. After that, if you want to show all the files again, you can click "show all sorted by imported time". You can also show subset of files fitting the search criterion by popup menu "Search files ...". More about the setting of search-criterion, you can refer to help page by ?SearchFiles.

You can sort the files by file names as well. See tip 3 for more.

You can calculate the total number of files in a project by using R command length(GetFileId()), the total number of uncoded file by command length(GetFileId(type="uncoded")), and number of coded file by command length(GetFileId(type="coded")).

3. Codes

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 "code" 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.

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 "coding". 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.

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 "coding retrieval". 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 SummaryCodings() 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 GetCodingTable and GetFileId function. For more information, please refer to the help page by ?GetCodingTable and ?GetFileId.

When the file is open, all the codings are highlighted. You can click "HL ALL" button to achieve the same effect.

After finish coding, you can retrieve the coded text segments with the selected code. Unconditional retrieval, retrieval codings associated with specific case or file categories are all possible by setting type of retrieval (see section 8. setting for more).

4. Writing memo

Writing what you think during reading and coding is an integral part of QDA. This is called "Memo writing", and what you write is "Memo". 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.

5. File categories

File category (or F-Cat in early version of RQDA) helps to organize your files. For example, when I analyze newspaper reports, I would like to classify the files accoding to the sources (what newspaper does a file come from), so I add the name of newspapers as categories. You can click "add" button in F-CAT Tab to do this. Then you want to add files to a specific category, you select that category first, then click "AddTo" button, a file list pops up, select files belonging to this categroy and click "OK". If you want to delete files from a category, select a category first, then files of this category will show in the "Files.of.This.Categroy", select files you want to drop from this category, then cilck "DropFrom" button.

The other way to add files to category: in Files Tab, select files you want to add to a category, then click "Add to file category ..." in popup menu of Files Tab, then a file category list pops up, select one category and click "OK".

Of course, you can rename the file category and delete them. Delete file category will not affect the original files. If you want to delete original files, you should go to Files Tab to delete files.

6. Code categories

Code category (or C-Cat in early version of RQDA) is crucial facilitator of theory development. The two most important steps in this process is 1) to move between concepts of different level of abstraction; and 2) to organize those concepts according to the logical relationship among them. C-cat helps you to do the second type of work.

First, you add a higher (comparaed to codes) level concept by clicking "add" button. You can add more by similar step. Then You add codes to one higher level concept. To do this, you first select that higher level concept, then click "AddTo" button. A list of codes pops up, you can select codes you want to add, then click ok. If you want to delete codes from a category, select a category first, then codes of this category will show in the "Codes.of.This.Categroy", select codes you want to drop from this category, then cilck "DropFrom" button. The operation is similar to F-Cat.

You may want to organize those higher level concepts--"structure of concepts". RQDA doesn't provide tree-like structure to organize them. I avoid this choice because sometimes tree-like structure brings confusion (loops between concepts are possible, which is the main sources of confusion). Besides, one code can be classified into mutiple categories, which is not easily handled by tree-like structure. Meanwhile, I would like to encourage users to think hard about the structure of higher level concepts. After all, theory should inform knowledge in a parsimonious way. It makes no sense to make theory as complex as the real-world. Still, it is possible to manage higher level concepts in using proper naming rules. For example, I have "trust" and "norms of reciprocity", and I want to group them by "cognitive social capital". Then I can rename them to "10-trust","10-norms of reciprocity", and "1-cognitive social capital". By sorting (see tips 3), you can see the relationship between these concepts.

RQDA provides a basic tool to plot the relationship between codes.

7. Cases

The concept of case in RQDA comes from Qualitative Comparative Analysis (QCA). It is implemented but not documented yet.

Two differences between file category and cases: a) you can assign attributes to a case but not a file category. By exporting the attributes, we can do QCA. b) you can link part of a file to a case but only a whole file to a file category.

How to assign a file to a case: a) select a file in Files Tab, right-click, in the popup menu, you can see "add to a case....". This method will add a whole file to a case. b) Open a file, select part of the file, select a case name, then click button "mark" in cases Tab, you can link the selected part of file to the selected case.

8. Attributes

"Attribute" is basically the same concept of variable in quantitative study. When the "unit of analysis" is clearly defined, then each unit of analysis is treated as a case. You can assign attributes to a file or a case. The choice depends on your research design and questions. Usually, attributes of a file is closely related to data collection process, while attributes of a case is more analytical since what is a case depends on your analytical process.

For example, the research might be on collective action. Collective action is the unit of analysis, and I treat each as a case. By assigning attributes of collective action I can analysis the conditions of collective action.

To gain information about collective actions, I interview participants. Each interview record is a file, I can assign attributes (SES of the participants) of each files. The attributes of files play two roles. First, it can be used to show subset of files (it can be done by file category, but more efficient if the subset condition is complicated). Second, you can do statistics on these SES attributes, so you can report the profile of interviewees.

There is a delete button on Attributes Tab, you can select one attribute and delete it. This operation will delete all case attribute and file attributes. So please be cautious.

9.1 Use SQL to perform complex query

There are several very powerful RQDA commands which do not appear in the GUI. To see them enter in the R window: help(package="RQDA")

All kinds of boolean searches can be done on coded data. Unfortunately this has not yet been implemented in the GUI. But boolean searches can be done very easily by typing a command in the R window.

Codes are identified by cid numbers like 1, 2, 3, etc.

To see the cid numbers of different codes give the command: GetCodingTable()
To see the selected text for code 1 give the command: RQDAQuery("select seltext from coding where cid=1")
To see codings of code 1 OR code 2, you can search by: RQDAQuery("select seltext from coding where cid=1 or cid=2")

For more on RQDAQuery use:?RQDAQuery
For more commands use: help(package="RQDA")

Contributed by Amman Madan (amman@iitk.ac.in)

9.2 Boolean search

To do complex Boolean search, programming is needed. Currently, some are supported by RQDA.

To retreive coding by cid 1 and cid 2, you can run the following command:
coding <- GetCodingTable()
c1 <- subset(coding,cid==1)
c2 <- subset(coding,cid==2)

In RQDA 0.2-0, boolean operations are simplied by functions of %and%, %or% and %not%. To retreive codings coded by cid 1 and cid 2, you can run: getCodingsByOne(1) %and% getCodingsByOne(2).

To retreive codings coded by cid 1 but not cid 2, you can run: getCodingsByOne(1) %not% getCodingsByOne(2)

please note that the print method put the resulting codings into a gtext widget, so you can read it with ease.

You can also use the following commands to conduct the same inquiry:
and(getCodingsByOne(1), getCodingsByOne(2))
or(getCodingsByOne(1), getCodingsByOne(2))
not(getCodingsByOne(1), getCodingsByOne(2))

You can do more complex operation as well. For example, to retreive codings coded by cid 1 and cid 2, plus codings coded by cid 3 but not cid 4. You can run:
summary((getCodingsByOne(1) %and% getCodingsByOne(1)) %or% getCodingsByOne(3) %not% getCodingsByOne(4) )

Please note that %and%, %or% and %not% apply to file ids, file names, case ids, case names, all of which are objects with class "RQDA.vector".

9.3. Text mining of codings

By RQDAtm package, codings are easily converted into Corpus, then you can use tm package to do text mining. You need to open a rqda project first. Examples can be found here [PDF].

10. Settings

"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.

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.

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.

When "Type of retrieval" is set to "case", and a case is selected, then only codings of the selected case is retrieved. However, if no cases are selected, all codings of the selected code are retrieved. Similarly, when set to "filecategory", and a file category is selected, then only codings of that category will be retrieved.

11. Implementation History

When I started my PhD research project, I planned to conduct some content analysis of newspaper reports. I need a QDA software. I hope it is available to me, has basic functionalits of QDA software, runs both under Windows and Linux/FreeBSD. Last but not least, I should have full control of it. I can't find one, so I decided to write one by myself. I had this idea in 2007, but not until late 2008 do I implemented most parts of this package.

12. Warranty

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 license.


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: Sys.setlocale(locale = "zh_CN.UTF-8").
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).
3. Besides the C-Cat and F-Cat, you can use a trick to help organize files, codes list,and cases by using specific name rules. For example, if you name a group of codes with 1 as prefix and another group of codes with 2 as prefix, then you can click the triangle symbol in ther right-upper corners of the Codes List table, then the codes are sorted according to their prefix. Similar trick applies to others.
4. If a file is large, and you want to quit RQDA without finish coding, you can write a file memo, say "unfinished". Afterwards, you can use "Search File..." of the file pop-up menu to locate the file by "memo like '%unfinished%'".


Q:How can I get help?
A: You can join the
rqda-help list and post questions via email.
Q:Can I conduct statistical analysis of the codes?
A: Depends on the method of coding. For factual coding, you can do statisitcal analysis. If the documents are representative, you can do referential analysis; otherwise, you can only conduct descriptive analysis.
Q:Why should I use computer-aided QDA? Is it more efficient?
A: CAQDA is time-consuming, but it makes the data analysis process more systematic, more tractable, and more transparent. It "forces" you to think hard about your data and the connection with theory (once you know the idea behind the CAQDA). Depending on the methodological paradigms, you may conduct Qualitative Comparative Analysis or examine some hypotheses (Not in the sense of statistical test of hypotheses) (See Kelle 1995 for details).
Q: My Vista is English, but the *.rqda include Chinese, and it can not display correctly.
A: One possible reason is the font issue. You can uninstall GTK+. Launch R, set the locale to CHS by command Sys.setlocale(,"CHS"), load RGtk2 by command library(RGtk2), then R will ask if you want to install GTK+, install it. Then you can launch RQDA. It should work.
Q: I press the save button in the memo/journal widget, but it warns that I have not saved it yet when I try to close the widget. Why?
A: This may be due to the encoding issue. Set the appropriate locale by Sys.setlocale function. The technical aspect is that RQDA needs to convert ' into '' by gsub in order to save it in SQLite database, without proper locales, the conversion may not what you want.
Q: Will RQDA support coding of audio files in the near future?
A: Maybe not.I prefer to use specialized software such as Transcriber. If necessary, an interface between RQDA and *.trs might be provided in the future.