Skip to content

mixingmatrix complains about the attr '' (empty) in the background #102

@martinamorris

Description

@martinamorris

The console shows the following error when the Network Descriptives tab is selected:

Image

The code it refers to is this:

output$mixmxchooser <- renderUI({
selectInput('mixmx', label='Choose attribute',
choices = menuattr())
})
outputOptions(output,'mixmxchooser',suspendWhenHidden=FALSE)
output$mixingmatrix <- renderPrint({
if(!is.network(nw())) {return()}
if(!is.null(input$mixmx)){
mixingmatrix(nw(), input$mixmx)}
})

If IIUC, the menuattr is a cleaned list of attributes that excludes "vertex.names" and "na":

#don't allow "na" or "vertex.names" as vertex attributes in menus on fit tab
menuattr <- reactive({
menuattr <- attrib()
if(is.element("na",menuattr)){
menuattr <- menuattr[-which("na"==menuattr)]
}
if(is.element("vertex.names",menuattr)){
menuattr <- menuattr[-which("vertex.names"==menuattr)]
}
menuattr
})

So I'm not sure what the problem is.

@mbojan if you have any ideas, pls lmk, thx.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions