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

degreedist.egor() trips for prob=FALSE #82

Closed mbojan closed 2 months ago

mbojan commented 2 months ago

Function degreedist() trips if prob is FALSE:

library(ergm.ego)
data("faux.mesa.high", package="ergm")
fmh <- as.egor(faux.mesa.high)
degreedist(fmh, plot=TRUE, prob=FALSE)
#> Error in degreedist.egor(fmh, plot = TRUE, prob = FALSE): object 'maxfreq' not found

but only if by=NULL because this works:

degreedist(fmh, plot=TRUE, prob=FALSE, by="Sex")
martinamorris commented 2 months ago

This needs a code fix, right?

mbojan commented 2 months ago

This needs a code fix, right?

Yes. I fixed it, but the checks started to fail for some other reason... I'm looking into it.