statnet / statnetWeb

A graphical user interface for network modeling with the 'statnet' software
GNU General Public License v3.0
29 stars 17 forks source link

ergm formula error on GOF plot when multiple models are saved #82

Closed martinamorris closed 3 years ago

martinamorris commented 3 years ago
  1. fitting edges+nodecov("wealth") produces this GOF plot page, no error:

Screenshot (240)

  1. fitting sequentially, first edges, saving the model, then +nodecov("wealth") and saving the model, produces this GOF plot page with error

Screenshot (242)

to reproduce:

library(statnetWeb)
run_sw()

and interactively:

  1. on Data tab select flomarriage network
  2. on Fit Model tab:
    • Add Term(s) edges
    • Fit Model
    • Save Current Model (will be 1/5)
    • Add Term(s) nodecov("wealth")
    • Save Current Model (will be 2/5)
      1. on Goodness of Fit tab
    • error will be displayed in ergm formula on top of page
martinamorris commented 3 years ago

Here is what shows in the Rstudio console window:

Warning in if (!is.na(attribValue)) { :
  the condition has length > 1 and only the first element will be used
Warning: Error in writeImpl: Text to be written must be a length-one character vector
  106: stop
  105: writeImpl
  104: textWriter$write
  103: FUN
  102: lapply
  101: tagWrite
  100: doRenderTags
   99: processDeps
   98: transform
   97: func
   95: f
   94: Reduce
   85: do
   84: hybrid_chain
   83: renderFunc
   82: output$uichoosemodel_sim
    2: shiny::runApp
    1: run_sw
chad-klumb commented 3 years ago

Not happening in master. Probably fixed last year in 2085fd8f1a5517fbd55fd128baa6796445b2c725.

gof

martinamorris commented 3 years ago

ok, so we just have to push, thx.