Vertex attribute terms fail at extracting it
还没有人认领这个 Issue。
评估
调研方向
Reproduce the example using Layer, summary(), ergm(), and nodecov("x"), then inspect the term initialization path described in the report and use rlang::last_trace() after ergm_Init_abort(). Done means vertex attribute x remains available during initialization so both summary() and ergm() accept the nodecov term for the business and marriage layers.
由索引模型根据 Issue 内容生成。
描述
This is a exegesis of this question on SO:
library(ergm.multi)
data(florentine, package = "ergm")
plot(flobusiness)
plot(flomarriage)
flo <- Layer(business = flobusiness, marriage = flomarriage)
set.vertex.attribute(flo, attrname = "x", value = 1:32)
flo
# Works
summary(
flo ~ L(~ edges, ~ business) + L(~ edges, ~ marriage)
)
# Works
ergm(
flo ~ L(~ edges, ~ business) + L(~ edges, ~ marriage)
)
# Doesn't work
summary(
flo ~ L(~ edges + nodecov("x"), ~ business) +
L(~ edges + nodecov("x"), ~ marriage)
)
# Error in `ergm_Init_abort()`:
# ! In term ‘nodecov’ in package ‘ergm’ (called from term ‘L’ in package ‘ergm.multi’): ‘x’ is/are not valid nodal attribute(s).
# Run `rlang::last_trace()` to see where the error occurred.
Brief debugging suggests that the term initialization function receives the network object stripped of all the attributes, hence x above is not found.
- 主要语言
- R
- 星标
- 16
- 派生
- 1
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
statnet/ergm.multi 的其他 Issue
-
Simplify combined_networks structure?可能重新可做 @krivit 于 238 天前认领,目前没有进行中的 PR。 未关闭
statnet/ergm.multi#43 · 1 条评论 · 1 个 reaction · 已指派 2 人 ·
-
难度 5/5 一周以上 新手友好度 25/100
statnet/ergm.multi#42 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
statnet/ergm.multi#39 ·
-
难度 4/5 3-5 天 新手友好度 45/100
statnet/ergm.multi#38 ·
-
难度 5/5 一周以上 新手友好度 25/100
statnet/ergm.multi#16 · 2 条评论 ·
查看 statnet/ergm.multi 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 78/100
PecanProject/pecan#4236 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
nf-core/nanostring#195 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
bgreenwell/pdp#140 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 87/100