R Under development (unstable) (2024-07-02 r86866 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # part of the Statnet suite > # of packages for network analysis, http://statnet.org . > # > # This software is distributed under the GPL-3 license. It is free, > # open source, and has the attribution requirements (GPL Section 7) at > # http://statnet.org/attribution > # > # Copyright 2012-2013 Statnet Commons > ####################################################################### > > # test the timeline functions > require(testthat) Loading required package: testthat > require(ndtv) Loading required package: ndtv Loading required package: network 'network' 1.18.2 (2023-12-04), part of the Statnet Project * 'news(package="network")' for changes since last version * 'citation("network")' for citation information * 'https://statnet.org' for help, support, and other information Loading required package: networkDynamic 'networkDynamic' 0.11.4 (2023-12-10?), part of the Statnet Project * 'news(package="networkDynamic")' for changes since last version * 'citation("networkDynamic")' for citation information * 'https://statnet.org' for help, support, and other information Loading required package: animation Loading required package: sna Loading required package: statnet.common Attaching package: 'statnet.common' The following objects are masked from 'package:base': attr, order sna: Tools for Social Network Analysis Version 2.7-2 created on 2023-12-05. copyright (c) 2005, Carter T. Butts, University of California-Irvine For citation information, type citation("sna"). Type help(package="sna") to get started. 'ndtv' 0.13.4 (2024-06-30), part of the Statnet Project * 'news(package="ndtv")' for changes since last version * 'citation("ndtv")' for citation information * 'https://statnet.org' for help, support, and other information > > # test on network datasets > data(windsurfers) > timeline(windsurfers) > > data(McFarland_cls33_10_16_96) > timeline(cls33_10_16_96) > > data(newcomb) > timeline(networkDynamic(network.list=newcomb)) Neither start or onsets specified, assuming start=0 Onsets and termini not specified, assuming each network in network.list should have a discrete spell of length 1 Argument base.net not specified, using first element of network.list instead Created net.obs.period to describe network Network observation period info: Number of observation spells: 1 Maximal time range observed: 0 until 14 Temporal mode: discrete Time unit: step Suggested time increment: 1 > > data(stergm.sim.1) > timeline(stergm.sim.1) > > # plot empty net > timeline(network.initialize(0)) > > > # plot only vertices > timeline(windsurfers,plot.edge.spells=FALSE) > > # plot only edges > timeline(windsurfers,plot.vertex.spells=FALSE) > > # plot subset of vertices > timeline(windsurfers,v=5:10) > > # plot only subset of edges > timeline(windsurfers,e=5:10) > > > # set colors > timeline(stergm.sim.1,vertex.col='orange',edge.col='green') > > # test vertex color expansions > timeline(stergm.sim.1,vertex.col='priorates') > timeline(stergm.sim.1,v.label.col='priorates') > > # test edge colors > # show only edge spells, hilite edge id 20 > set.edge.attribute(stergm.sim.1,'my_color','gray') > set.edge.attribute(stergm.sim.1,'my_color','red',e=20) > timeline(stergm.sim.1,edge.col='my_color',plot.vertex.spells=FALSE) > timeline(stergm.sim.1,edge.col=1:10) > > # test label expansions > timeline(stergm.sim.1,v.label='a') > timeline(stergm.sim.1,v.label='priorates') > timeline(stergm.sim.1,e.label='a') > timeline(stergm.sim.1,e.label='my_color') > > > # test vertex line size (vertex.cex) > timeline(stergm.sim.1,vertex.cex=stergm.sim.1%v%'priorates'/5,plot.edge.spells = FALSE) > > > # test edge line size > timeline(windsurfers,edge.lwd=5,xlim=c(0,1),plot.vertex.spells = FALSE) # this will only work with update to network > set.edge.attribute(windsurfers,'value',1:5) > timeline(windsurfers,edge.lwd='value',xlim=c(0,1),plot.vertex.spells = FALSE) > timeline(windsurfers,edge.lwd=windsurfers%e%'value',xlim=c(0,1),plot.vertex.spells = FALSE) > > # test plotting spell bounds > slice.par<-list(start=0,end=24,interval=6, aggregate.dur=5,rule="any") > timeline(cls33_10_16_96,slice.par=slice.par) > slice.par<-list(start=0,end=24,interval=1, aggregate.dur=0,rule="any") > timeline(cls33_10_16_96,slice.par=slice.par) > > # test setting plot bounds, bug #735 > timeline(cls33_10_16_96,ylim=c(20,30)) > timeline(cls33_10_16_96,xlim=c(0,10)) > > proc.time() user system elapsed 4.48 0.43 4.90