Skip to content

Commit

Permalink
still using preconstructed vectors for cug terms (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebey committed Jul 23, 2015
1 parent d1a3918 commit 7f9b89d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion inst/shiny/global.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ splitargs <- function(searchterm, nw){
dups <- duplicated(termnames)
termargs <- termargs[-which(dups)]
termnames <- unique(termnames)
list(termnames, termargs)
list(names = termnames, args = termargs)
}


Expand Down
8 changes: 5 additions & 3 deletions inst/shiny/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -2117,7 +2117,9 @@ output$dynamiccugterm <- renderUI({
} else {
choices <- c("density", "concurrent", "isolates", "mean degree" = "meandeg")
}
selectInput("cugtestterm", label = "Model term",
#matchingterms <- splitargs(nw = nw())
#choices <- matchingterms$names[matchingterms$args == "()"]
selectizeInput("cugtestterm", label = "Model term",
choices = choices)
})
outputOptions(output, 'dynamiccugterm', suspendWhenHidden = FALSE)
Expand Down Expand Up @@ -2777,10 +2779,10 @@ output$listofterms <- renderUI({
return()
}
if(state$allterms){
current.terms <- allterms[[1]]
current.terms <- allterms$names
} else {
matchterms <- splitargs(nw = nw())
current.terms <- matchterms[[1]]
current.terms <- matchterms$names
}
selectizeInput('chooseterm', label = NULL,
choices = c("Select a term" = "", current.terms))
Expand Down

0 comments on commit 7f9b89d

Please sign in to comment.