This is a very inelegant solution and I'm sure someone smarter than me could do better. Call it the brute force approach. The basic idea is that rather than using crossprod() to get a single adjacency matrix, create separate adjacency matrices for every date. You can do this by turning the initial data into a matrix that replicates each row by the size of the data, and then multiplying by the transpose of itself. Then turn each adjacency matrix into an edgelist and add the date as an attribute of every edge. Then combine all the edgelists into one. Create an igraph object from the edgelist. Then add the dates as an edge attribute (as far as I know, igraph requires that you do these last two as separate steps). I told you it was inelegant.
library(igraph)
dates <- paste("day",1:4) # I simplified the dates
data <-matrix(c(0,1,1,0,0,0,0,1,0,0,0,1,1,1,0,0,1,1,1,1,0,1,1,1,0,0,1,1),
ncol = 7, nrow = 4, byrow =T) # your data
colnames(data) <- letters[1:7]
rownames(data) <- dates
data <- as.data.frame(t(data)) # turn the data on its side
edgelists <- mapply(function(x, dates){
m <- matrix(x,nrow = length(x), ncol = length(x)) #turn each ROW of original data (now each COLUMN) into a matrix
rownames(m) <- colnames(m) <- rownames(data) # it will help to keep track of the names
n <- as.data.frame(as_edgelist(graph_from_adjacency_matrix(m*t(m)))) #create adjacency matrix and then turn it back into an edgelist
n$date <- dates # asign date
return(n)
},
x = data,
dates = as.list(dates),
SIMPLIFY =F)
el <- do.call("rbind", edgelists) # combine all edgelists into one
ig <- graph_from_edgelist(as.matrix(el[,1:2])) # make igraph object
E(ig)$date <- el$date # add the date as edge attribute
plot(ig, edge.label = E(ig)$date)) #check result