Including static Edge Attributes into dynamic network using networkDynamic () gives warning message

Good Evening,
I’m trying to build a dynamic network using networkDynamic() in R. I finally got it to run and build a network, but then I kept getting over 50 warning messages. One for each edge id ####.

I could not find this warning on a google search. I realize something is going on with the edge attributes. I have a node_df set up like…

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>x <- data.frame(start_time = rep(1648789456, 5), end_time = rep(1682571364, 5), value = as.integer(c(1,2,3,4,5)), propertyID = c("1659425840", "302027335", "1325538711", "1420839984", "35919230"), lat = c(-7.318461, -7.202876, -7.290118, -7.490271, -7.436534), long = c(-110.7441, -110.6784, -110.9157, -112.5476, -112.5974))
start_time end_time value propertyID lat long
1 1648789456 1682571364 1 1659425840 -7.318461 -110.7441
2 1648789456 1682571364 2 302027335 -7.202876 -110.6784
3 1648789456 1682571364 3 1325538711 -7.290118 -110.9157
4 1648789456 1682571364 4 1420839984 -7.490271 -112.5476
5 1648789456 1682571364 5 35919230 -7.436534 -112.5974
str(node_df)
'data.frame': 186 obs. of 7 variables:
$ start_time : num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
$ end_time : num 1.68e+09 1.68e+09 1.68e+09 1.68e+09 1.68e+09 ...
$ value : int 1 2 3 4 5 6 7 8 9 10 ...
$ propertyID : chr "1659425840" "302027335" "1325538711" "1420839984" ...
$ lat : num -7.32 -7.2 -7.29 -7.49 -7.44 ...
$ long : num -111 -111 -111 -113 -113 ...
</code>
<code>x <- data.frame(start_time = rep(1648789456, 5), end_time = rep(1682571364, 5), value = as.integer(c(1,2,3,4,5)), propertyID = c("1659425840", "302027335", "1325538711", "1420839984", "35919230"), lat = c(-7.318461, -7.202876, -7.290118, -7.490271, -7.436534), long = c(-110.7441, -110.6784, -110.9157, -112.5476, -112.5974)) start_time end_time value propertyID lat long 1 1648789456 1682571364 1 1659425840 -7.318461 -110.7441 2 1648789456 1682571364 2 302027335 -7.202876 -110.6784 3 1648789456 1682571364 3 1325538711 -7.290118 -110.9157 4 1648789456 1682571364 4 1420839984 -7.490271 -112.5476 5 1648789456 1682571364 5 35919230 -7.436534 -112.5974 str(node_df) 'data.frame': 186 obs. of 7 variables: $ start_time : num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ... $ end_time : num 1.68e+09 1.68e+09 1.68e+09 1.68e+09 1.68e+09 ... $ value : int 1 2 3 4 5 6 7 8 9 10 ... $ propertyID : chr "1659425840" "302027335" "1325538711" "1420839984" ... $ lat : num -7.32 -7.2 -7.29 -7.49 -7.44 ... $ long : num -111 -111 -111 -113 -113 ... </code>
x <- data.frame(start_time = rep(1648789456, 5), end_time = rep(1682571364, 5), value = as.integer(c(1,2,3,4,5)), propertyID = c("1659425840", "302027335", "1325538711", "1420839984", "35919230"), lat = c(-7.318461, -7.202876, -7.290118, -7.490271, -7.436534), long = c(-110.7441, -110.6784, -110.9157, -112.5476, -112.5974))

start_time   end_time value propertyID       lat      long
1   1648789456 1682571364     1 1659425840 -7.318461 -110.7441
2   1648789456 1682571364     2  302027335 -7.202876 -110.6784
3   1648789456 1682571364     3 1325538711 -7.290118 -110.9157
4   1648789456 1682571364     4 1420839984 -7.490271 -112.5476
5   1648789456 1682571364     5   35919230 -7.436534 -112.5974

 str(node_df)
'data.frame':   186 obs. of  7 variables:
 $ start_time : num  1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
 $ end_time   : num  1.68e+09 1.68e+09 1.68e+09 1.68e+09 1.68e+09 ...
 $ value      : int  1 2 3 4 5 6 7 8 9 10 ...
 $ propertyID : chr  "1659425840" "302027335" "1325538711" "1420839984" ...
 $ lat        : num  -7.32 -7.2 -7.29 -7.49 -7.44 ...
 $ long       : num  -111 -111 -111 -113 -113 ...

and an edge_df

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>y = data.frame(start_time = c(1650650617, 1650923498, 1651193217, 1651250902, 1651536477), end_time = c(1650923498, 1651167751, 1651250808, 1651516317, 1651774828), from = as.integer(c(10, 2, 1, 6, 9)), to = as.integer(c(2,1,6,9,10)), edgeID = c("C030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518"), veh_type = c("users", "users", "trucks", "trucks", "other"))
start_time end_time from to edgeID veh_type
1 1650650617 1650923498 10 2 DC030E39-F95C-43CB-A9DF-2412DC984518 users
2 1650923498 1651167751 2 1 DC030E39-F95C-43CB-A9DF-2412DC984518 users
3 1651193217 1651250808 1 6 DC030E39-F95C-43CB-A9DF-2412DC984518 users
4 1651250902 1651516317 6 9 DC030E39-F95C-43CB-A9DF-2412DC984518 users
5 1651536477 1651774828 9 10 DC030E39-F95C-43CB-A9DF-2412DC984518 users
str(edge_df)
'data.frame': 119046 obs. of 6 variables:
$ start_time: num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
$ end_time : num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
$ from : int 10 2 1 6 9 10 7 15 7 15 ...
$ to : int 2 1 6 9 10 7 15 7 15 7 ...
$ edgeID : chr "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" ...
$ veh_type : chr "users" "users" "users" "users" ...
</code>
<code>y = data.frame(start_time = c(1650650617, 1650923498, 1651193217, 1651250902, 1651536477), end_time = c(1650923498, 1651167751, 1651250808, 1651516317, 1651774828), from = as.integer(c(10, 2, 1, 6, 9)), to = as.integer(c(2,1,6,9,10)), edgeID = c("C030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518"), veh_type = c("users", "users", "trucks", "trucks", "other")) start_time end_time from to edgeID veh_type 1 1650650617 1650923498 10 2 DC030E39-F95C-43CB-A9DF-2412DC984518 users 2 1650923498 1651167751 2 1 DC030E39-F95C-43CB-A9DF-2412DC984518 users 3 1651193217 1651250808 1 6 DC030E39-F95C-43CB-A9DF-2412DC984518 users 4 1651250902 1651516317 6 9 DC030E39-F95C-43CB-A9DF-2412DC984518 users 5 1651536477 1651774828 9 10 DC030E39-F95C-43CB-A9DF-2412DC984518 users str(edge_df) 'data.frame': 119046 obs. of 6 variables: $ start_time: num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ... $ end_time : num 1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ... $ from : int 10 2 1 6 9 10 7 15 7 15 ... $ to : int 2 1 6 9 10 7 15 7 15 7 ... $ edgeID : chr "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" ... $ veh_type : chr "users" "users" "users" "users" ... </code>
y = data.frame(start_time = c(1650650617, 1650923498, 1651193217, 1651250902, 1651536477), end_time = c(1650923498, 1651167751, 1651250808, 1651516317, 1651774828), from = as.integer(c(10, 2, 1, 6, 9)), to = as.integer(c(2,1,6,9,10)), edgeID = c("C030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518", "DC030E39-F95C-43CB-A9DF-2412DC984518"), veh_type = c("users", "users", "trucks", "trucks", "other"))

  start_time   end_time from to                               edgeID veh_type
1 1650650617 1650923498   10  2 DC030E39-F95C-43CB-A9DF-2412DC984518    users
2 1650923498 1651167751    2  1 DC030E39-F95C-43CB-A9DF-2412DC984518    users
3 1651193217 1651250808    1  6 DC030E39-F95C-43CB-A9DF-2412DC984518    users
4 1651250902 1651516317    6  9 DC030E39-F95C-43CB-A9DF-2412DC984518    users
5 1651536477 1651774828    9 10 DC030E39-F95C-43CB-A9DF-2412DC984518    users

str(edge_df)
'data.frame':   119046 obs. of  6 variables:
 $ start_time: num  1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
 $ end_time  : num  1.65e+09 1.65e+09 1.65e+09 1.65e+09 1.65e+09 ...
 $ from      : int  10 2 1 6 9 10 7 15 7 15 ...
 $ to        : int  2 1 6 9 10 7 15 7 15 7 ...
 $ edgeID    : chr  "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" "DC030E39-F95C-43CB-A9DF-2412DC984518" ...
 $ veh_type  : chr  "users" "users" "users" "users" ...

I tried running…

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>dyn_net <- networkDynamic(vertex.spells = node_df, edge.spells = edge_df, create.TEAs = TRUE)
</code>
<code>dyn_net <- networkDynamic(vertex.spells = node_df, edge.spells = edge_df, create.TEAs = TRUE) </code>
dyn_net <- networkDynamic(vertex.spells = node_df, edge.spells = edge_df, create.TEAs = TRUE)

OR

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test,
create.TEAs = TRUE,
vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long"))
</code>
<code>dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test, create.TEAs = TRUE, vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long")) </code>
dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test,
                          create.TEAs = TRUE,
                          vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long"))

OR

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test,
create.TEAs = TRUE,
vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long"), edge.TEA.names = c("edgeID", "veh_type"))
</code>
<code>dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test, create.TEAs = TRUE, vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long"), edge.TEA.names = c("edgeID", "veh_type")) </code>
dyn_net <- networkDynamic(vertex.spells = node_df,edge.spells = test,
                          create.TEAs = TRUE,
                          vertex.TEA.names = c("propertyID", "prop_type_c", "lat", "long"), edge.TEA.names = c("edgeID", "veh_type"))

My outcome:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Initializing base.net of size 186 imputed from maximum vertex id in edge records
Activated TEA vertex attributes: propertyID, prop_type_c, lat, longActivated TEA edge attributes: edgeID, veh_typeCreated net.obs.period to describe network
Network observation period info:
Number of observation spells: 1
Maximal time range observed: 1648789456 until 1682571364
Temporal mode: continuous
Time unit: unknown
Suggested time increment: NA
There were 50 or more warnings (use warnings() to see the first 50)
warning()
4: In FUN(X[[i]], ...) :
edge spell data induced an invalid spell matrix for edge TEA 'veh_type' for edge id 1861
</code>
<code>Initializing base.net of size 186 imputed from maximum vertex id in edge records Activated TEA vertex attributes: propertyID, prop_type_c, lat, longActivated TEA edge attributes: edgeID, veh_typeCreated net.obs.period to describe network Network observation period info: Number of observation spells: 1 Maximal time range observed: 1648789456 until 1682571364 Temporal mode: continuous Time unit: unknown Suggested time increment: NA There were 50 or more warnings (use warnings() to see the first 50) warning() 4: In FUN(X[[i]], ...) : edge spell data induced an invalid spell matrix for edge TEA 'veh_type' for edge id 1861 </code>
Initializing base.net of size 186 imputed from maximum vertex id in edge records
Activated TEA vertex attributes:  propertyID, prop_type_c, lat, longActivated TEA edge attributes:  edgeID, veh_typeCreated net.obs.period to describe network
 Network observation period info:
  Number of observation spells: 1 
  Maximal time range observed: 1648789456 until 1682571364 
  Temporal mode: continuous 
  Time unit: unknown 
  Suggested time increment: NA 
There were 50 or more warnings (use warnings() to see the first 50)

warning()

4: In FUN(X[[i]], ...) :
  edge spell data induced an invalid spell matrix for edge TEA 'veh_type' for edge id 1861

Of course, this sample data did not reproduce the warning 🙁 But this is a sample of the real data, so I’m not sure how to make it reproducible w/out the whole data set (which I can’t supply). If you run networkDynamic on these small dfs, then it works.

When I took out the attributes from the original complete edge_df (last 2 columns in the edge_df) and ran networkDynamic() again, it worked with no warnings. The vertex attributes came out just fine. The attributes in the edge_df are not dynamic, but static. Each edge is an ID of a specific vehicle to track and it’s type. I don’t know if this changes anything.
Eventually, what I want to do is create a multilevel multiplex network based on the edge attributes. My question then is why are the edge attributes causing the warnings, but the vertex attributes did not? And how can I add them in the network?

I’ve looked at these posts:
This This This This This

plus the R documentation and vignette.

I’m not sure if you need more information or not, please let me know.
Thank you for your help in advance.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật