statnet / ergm.ego

Fit, Simulate and Diagnose Exponential-Family Random Graph Models to Egocentrically Sampled Network Data https://statnet.org
Other
14 stars 4 forks source link

Using ppopsize = network object fails due to arg matching #40

Closed martinamorris closed 4 years ago

martinamorris commented 4 years ago

Yes, the docs say this is untested https://github.com/statnet/ergm.ego/blob/a40bf6b9dcdd9e1c68ed07e3ce1e25defbac6b3a/R/control.ergm.ego.R#L35-L36

But we need it now.

The problem is that control = control.ergm.ego(ppopsize = nw) throws the error

Error in match.arg(control[[arg]][1], eval(formal.args[[arg]])): 
  `arg` should be one of "auto", "samp", "pop"

But if you construct the control argument separately using a number, and replace the number with your nw it at least runs.