[英]How do I display with summaryCodings() only numbers of codings of a certain codecategory or several codes?
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). 我现在(第一次)正在使用RQDA,我想对编码数量进行概述/比较(以查看哪些编码使用得比较频繁,哪些编码很少使用)。
I've tried summaryCodings()
but it only gives me an overview of all codes. 我已经尝试了
summaryCodings()
但它只为我提供了所有代码的概述。
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")
. 我尝试了诸如
summaryCodings(codename == "xy")
或summaryCodings(codecategory == "xx")
, getCodingTable(codename == "xy" | codename == "zy")
。
I'm a beginner so still learning how to manage RQDA (obviously). 我是一个初学者,所以仍在学习如何管理RQDA(显然)。 Thank you for your help in advance!
提前谢谢你的帮助!
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 现在,您在“答案”变量中有了所需的答案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.