if (FALSE) {
# compute effective distance
data(ptnAth)
athnet <- igraph::as_adjacency_matrix(ptnAth, sparse=FALSE)
p <- athnet/rowSums(athnet)
eff <- eff_dist(p)
# apply source estimation
data(delayAth)
res <- plyr::alply(.data=delayAth[,-c(1:2)], .margins=1, .fun=origin_edm, distance=eff,
silent=TRUE, .progress='text')
perfAth <- plyr::ldply(Map(performance, x = res, start = as.list(delayAth$k0),
list(graph = ptnAth)))
}
if (FALSE) {
# compute effective distance
data(ptnGoe)
goenet <- igraph::as_adjacency_matrix(ptnGoe, sparse=FALSE)
p <- goenet/rowSums(goenet)
eff <- eff_dist(p)
# apply source estimation
data(delayGoe)
res <- plyr::alply(.data=delayGoe[,-c(1:2)], .margins=1, .fun=origin_edm, distance=eff,
silent=TRUE, .progress='text')
perfGoe <- plyr::ldply(Map(performance, x = res, start = as.list(delayGoe$k0),
list(graph = ptnGoe)))
}
Run the code above in your browser using DataLab