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

summary() command with scaleto appears to be broken #68

Closed martinamorris closed 3 years ago

martinamorris commented 3 years ago

now neither of the summary() commands are working for me (using CRAN versions)

library(ergm.ego)

> Loading required package: ergm

> Loading required package: network

>

> 'network' 1.17.1 (2021-06-12), part of the Statnet Project

> * 'news(package="network")' for changes since last version

> * 'citation("network")' for citation information

> * 'https://statnet.org' for help, support, and other information

>

> 'ergm' 4.0.1 (2021-06-20), part of the Statnet Project

> * 'news(package="ergm")' for changes since last version

> * 'citation("ergm")' for citation information

> * 'https://statnet.org' for help, support, and other information

> 'ergm' 4 is a major update that introduces some backwards-incompatible

> changes. Please type 'news(package="ergm")' for a list of major

> changes.

> Loading required package: egor

> Loading required package: dplyr

>

> Attaching package: 'dplyr'

> The following objects are masked from 'package:stats':

>

> filter, lag

> The following objects are masked from 'package:base':

>

> intersect, setdiff, setequal, union

> Loading required package: tibble

>

> 'ergm.ego' 0.9.0 (2021-06-21), part of the Statnet Project

> * 'news(package="ergm.ego")' for changes since last version

> * 'citation("ergm.ego")' for citation information

> * 'https://statnet.org' for help, support, and other information

>

> Attaching package: 'ergm.ego'

> The following objects are masked from 'package:ergm':

>

> COLLAPSE_SMALLEST, snctrl

> The following object is masked from 'package:base':

>

> sample

set.seed(1) data("faux.mesa.high") mesa <- faux.mesa.high mesa.ego <- as.egor(mesa) summary(mesa.ego ~ degree(0:10), scaleto=100000) summary(mesa.ego ~ degree(0:10), scaleto=nrow(mesa.ego)*100)

> Error in if (length(x)%%length(y)) warning("length of ", sQuote("x"), : argument is not interpretable as logical

Created on 2021-06-21 by the reprex package (v2.0.0)

martinamorris commented 3 years ago

Note -- the first command, summary(mesa.ego ~ degree(0:10), scaleto=100000) produces no output, the second produces the error.

krivit commented 3 years ago

Yeah, the first one is a bug, and the second one is invalid user input. See https://github.com/statnet/Workshops-private/issues/18#issuecomment-865440911.