SCM

SCM Repository

[rqda] Diff of /pkg/RQDA/R/CodeCatButton.R
ViewVC logotype

Diff of /pkg/RQDA/R/CodeCatButton.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 507, Sun Apr 27 09:35:17 2014 UTC revision 508, Sun May 11 11:07:40 2014 UTC
# Line 214  Line 214 
214      })      })
215  }  }
216    
217    d3CodeCategory <-function(parent=NULL){
218      if (is.null(parent)) parent <- svalue(.rqda$.CodeCatWidget)
219      ans <- RQDAQuery(sprintf("select codecat.name as parent,freecode.name as child from treecode, codecat,freecode
220    where treecode.status=1 and codecat.status=1 and freecode.status=1
221    and treecode.catid=codecat.catid and freecode.id=treecode.cid and codecat.name in (%s)",paste(shQuote(parent),collapse=",")))
222      Encoding(ans$parent) <- "UTF-8"
223      Encoding(ans$child) <- "UTF-8"
224      file = paste(tempfile(), "html", sep=".")
225      d3Network::d3SimpleNetwork(ans, width = 400, height = 250,file=file)
226      browseURL(file)
227    }
228    
229  getCodingsByCategory <- function(catid=NULL, fid = NULL, codingTable = c("coding", "coding2")){  getCodingsByCategory <- function(catid=NULL, fid = NULL, codingTable = c("coding", "coding2")){
230      if (is.null(catid)) catid <- RQDAQuery(sprintf("select catid from codecat where name = '%s'", enc(svalue(.rqda$.CodeCatWidget))))$catid      if (is.null(catid)) catid <- RQDAQuery(sprintf("select catid from codecat where name = '%s'", enc(svalue(.rqda$.CodeCatWidget))))$catid
# Line 286  Line 297 
297  ## need to manually set the toolkit  ## need to manually set the toolkit
298  ##CodeCatWidgetMenu$"Plot Selected Code Category" <- psccItem  ##CodeCatWidgetMenu$"Plot Selected Code Category" <- psccItem
299  CodeCatWidgetMenu$"Plot Selected Code Categories"$handler <- function(h,...){plotCodeCategory()}  CodeCatWidgetMenu$"Plot Selected Code Categories"$handler <- function(h,...){plotCodeCategory()}
300    CodeCatWidgetMenu$"Plot Selected Code Categories with d3"$handler <- function(h,...){d3CodeCategory()}
301    
302  CodeCatWidgetMenu$"Sort by created time"$handler <- function(h,...){  CodeCatWidgetMenu$"Sort by created time"$handler <- function(h,...){
303   if (is_projOpen(envir=.rqda,conName="qdacon")) {   if (is_projOpen(envir=.rqda,conName="qdacon")) {

Legend:
Removed from v.507  
changed lines
  Added in v.508

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge