Skip to content

Commit 7592aeb

Browse files
committed
Compute mixing matrix only with a valid attribute
Compute the mixing matrix only if the name of the attribute is a valid name and present in the network object. Closes #102.
1 parent 348ac7c commit 7592aeb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

inst/shiny/statnetWeb/server.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,8 +2464,9 @@ outputOptions(output,'mixmxchooser',suspendWhenHidden=FALSE)
24642464

24652465
output$mixingmatrix <- renderPrint({
24662466
if(!is.network(nw())) {return()}
2467-
if(!is.null(input$mixmx)){
2468-
mixingmatrix(nw(), input$mixmx)}
2467+
if(!is.null(input$mixmx) && input$mixmx != "") {
2468+
mixingmatrix(nw(), input$mixmx)
2469+
}
24692470
})
24702471
outputOptions(output,'mixingmatrix',suspendWhenHidden=FALSE)
24712472

0 commit comments

Comments
 (0)