qmethod (version 1.5.5)

import.q.feedback: Q methodology: imports feedback on Q items


Turns raw item feedback (in *.CSV files) into a verified array or matrix.


import.q.feedback(q.feedback.dir,	q.sorts, q.set,	manual.lookup = NULL)



A relative path to a directory structure where:

  • (optional) folders are conditions (such as before and after), if there is more than one condition. Conditions are inferred from the specified q.sorts. If there are no conditions, there should be no folders.

  • filenames of *.CSV are participant names (might be given pseudonyms).

  • *.CSV files within folders contain raw feedback, beginning with an arbitrary header line (ignored), and the following columns, starting from the left:

    1. An ID, either as an automatic hash or manually specified (see qmethod-package), as specified per the manual.lookup option of make.cards. Each ID only occurs once.

    2. The full feedback in plain text, enclosed in quotes.

    3. Optionally, a logical indicator whether current line should be ignored (in which case it should be set to TRUE). If there is no such column, all feedback will be imported.


A matrix or array with handles as row names, participant as column names, (optional) conditions as 3rd dimension and cells as Q-sort ranks, as produced by import.q.sorts.


A matrix with handles as row names, languages (if applicable) in columns, as produced by build.q.set.


A matrix with handles as row names, and IDs (such as "sta121", as printed on the Q-cards by make.cards) in any of the columns. Defaults to NULL in which case items IDs are expected to be item wording hashes, as produced by make.cards.


Returns a matrix or array (if there is more than one condition) with handles as row names, people as column names, (optional) conditions as 3rd dimension name and item feedback in cells. The return parallels the output from import.q.sorts, but with feedback as array cells, rather than Q-sort ranks.


Participants in Q studies are often invited to provide open-ended feedback on items, giving researchers additional information on participants' viewpoints. This feedback is conveniently entered in a spreadsheet editor (2nd column), where each line of feedback corresponds to an item ID (1st column) An additional, optional (3rd) column indicates whether the current line should be ignored (TRUE), as may be the case for privacy reasons or when the feedback is merely a correction of a typographic error. If no such 3rd column is included, all feedback will be imported.

The automatic summary of full item wordings, technically known as hashing, proceeds internally by passing the full item wording to the digest function of the package digest (with arguments set to algo = crc32, serialize = FALSE.)

After an (arbitrary) header line, a *.CSV file may look like this: sta001,"This q-item sounds like r-research to me!",FALSE, indicating that it should not be ignored (FALSE).

If you are not familiar with the terminology of item handle, ID and wording or the file structure expected for import functions, please read the respective sections in the documentation for qmethod-package first or consider the package wiki

See Also

import.q.concourse, import.q.sorts, build.q.set, make.cards, qmethod


Run this code
path.feedback <- paste(            # this part is only for the example!
  path.package("qmethod"),         # just to make sure, use absolute path
  # import example files are in root/extdata of package:
  "/extdata/importexample/feedback/",  # location of sorts
  sep = ""
q.feedback <- import.q.feedback(   # now import the feedback
  q.feedback.dir = path.feedback,  # add your path here
  q.sorts = importexample$q.sorts,
  q.set = importexample$q.set,     # as produced by build.q.set
  manual.lookup = matrix(  # ideally empty for automatic hashing, or read in from *.CSV
    ncol = 1,
    nrow = 4,
    dimnames = list(c("r-dominance","q-uprising","small-village","life-with-q"),"ID")
# }

Run the code above in your browser using DataCamp Workspace