# NOT RUN {
library(ndtv)
data('short.stergm.sim')
# render a plot with edges colored by age at time 24
# edges labeld with age
plot(short.stergm.sim,edge.col=effect.edgeAgeColor(short.stergm.sim,
fade.dur=25,
start.color = 'red',
end.color='blue',
onset=24),
edge.label=edges.age.at(short.stergm.sim,24),
edge.lwd=5)
# }
# NOT RUN {
# render an animation where edges are colored dynamically by their age
# starting out red and fading to blue
compute.animation(short.stergm.sim,slice.par = list(start=0,
end=25,
interval=1, a
ggregate.dur=5,
rule='latest'))
render.animation(short.stergm.sim,edge.col=effectFun('edgeAgeColor',
fade.dur=5,
start.color = 'red',
end.color='blue'))
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab