Vertex attribute terms fail at extracting it

Đang mở
#27 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
r
Lĩnh vực
data

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
R
Star
16
Fork
1
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của statnet/ergm.multi

Tất cả issue của statnet/ergm.multi

Issue tương tự

Thêm issue về R

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.