1

I'm using RQDA right now (for the first time) and I want to have an overview/comparison of the numbers of codings (to see which codes were used comparatively often, which were barely used).

I've tried summaryCodings() but it only gives me an overview of all codes.

How do I specify to make sure only certain codes (or, for example, one code category, and not all codes) are displayed?

I've tried variations like summaryCodings(codename == "xy") or summaryCodings(codecategory == "xx"), getCodingTable(codename == "xy" | codename == "zy").

I'm a beginner so still learning how to manage RQDA (obviously). Thank you for your help in advance!

Emma
  • 11
  • 5

1 Answers1

0

This code will help you:

setwd("<working path>")
library("RMySQL")
con <- dbConnect(RSQLite::SQLite(), dbname="<database_name.rqda>")
answer <- dbGetQuery( con,'SELECT freecode.name, count(coding.cid) FROM treeCode, freecode, codecat, coding WHERE coding.cid = freecode.id AND treeCode.catid = codecat.catid AND treeCode.cid = freecode.id AND codecat.name = "<your option>" GROUP BY freecode.name')
dbDisconnect(con)

Now, you have the desired answer in 'answer' variable

Colibri
  • 682
  • 6
  • 8