Changes between Version 6 and Version 7 of NetworkDynamicConverterFunctions
- Timestamp:
- 10/01/12 21:07:45 (7 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NetworkDynamicConverterFunctions
v6 v7 36 36 nD to vertex spells : '''get.vertex.activity() - sortof, returns list not matrix'' 37 37 38 nD to toggles : ?39 40 38 == Problem == 41 39 … … 47 45 Separate functions for each type of conversion. Name functions by schemas they are converting, not by object types of arguments because toggles and spells are both represented with data frames. (maybe only keep an "as.data.frame" function aliased to most common use case? ). I think so far only duration.matrix() is a published method, so that may be the only one we have to keep around. 48 46 49 networkDynamic FromToggles(startNet=NULL,edge.toggles=NULL,vertex.toggles=NULL):: fill in edges and/or vertex spells in starting network using toggles. Toggles arguments can be anything convertible into a matrix. For edges will assume first columns are [tail,head,time]. What times assumed for ties in initial network?47 networkDynamic(base.net=NULL,network.list=NULL,edge.toggles=NULL,vertex.toggles=NULL,edge.spells=NULL,vertex.spells=NULL):: fill in edges and/or vertex spells in starting network using toggles. Toggles arguments can be anything convertible into a matrix. 50 48 51 networkDynamicFromSpells(startNet=NULL, edge.spells=NULL,vertex.spells=NULL, ...<rest of network properties>):: create/populate a nD using edge and/or vertex spells? Spells are any object convertible into a matrix. Edges assume format as [tail,head,onset,terminus], vertices [vertex.id,onset,terminus]49 For edge.toggles, assume first columns are [tail,head,time]. What times assumed for ties in initial network? 52 50 53 networkDynamicFromNetworks(network.list,onsets=seq(from=0,length=length(network.list)),termini=seq(from=1,length=length(network.list),vertex.pid=NULL):: create a nD object using a list of networks (or objects like matrices convertible to networks). Timing of each panel of vertex and edges . spells taken from onsets and termini arguments (defaults to [0,1].[1,2] etc..). If vertex.pid is set to the name of a network attribute, use that attribute as the vertex. id when constructing a network (for when inputs are not the same sizes. Censoring of starting / ending networks? 51 edge.spells format as [tail,head,onset,terminus] 52 53 vertex.spells [vertex.id,onset,terminus] 54 55 onsets=seq(from=0,length=length(network.list)) 56 57 termini=seq(from=1,length=length(network.list) 58 59 vertex.pid=NULL 60 61 network.list:: create a nD object using a list of networks (or objects like matrices convertible to networks). Timing of each panel of vertex and edges . spells taken from onsets and termini arguments (defaults to [0,1].[1,2] etc..). If vertex.pid is set to the name of a network attribute, use that attribute as the vertex. id when constructing a network (for when inputs are not the same sizes. Censoring of starting / ending networks? 54 62 55 63 get.vertex.activity(nD, v=1:network.size(x),as.spellList=FALSE):: currently this returns a list of spell matrices, one for each v specified. Add argument to return same info as a single spell matrix [onset.terminus,vertex.id]. Sort order by onset,terminus,vertex.id? Include attributes? … … 57 65 get.edge.activity(networkDynamic,as.spellList=FALSE):: currently this returns a list of spell matrices. Add "start" and "end" arguments for specifying censoring. Add argument to return same info as a single spell matrix [onset,terminus,tail,head,left.censored, right.censored, duration, edge.id]. Sort order by onset,terminus,tail,head,eid?. 58 66 59 get.vertex.toggles(networkDynamic,base.net=FALSE):: Return an array of toggles [vertex.id,onset,terminus]. Optionally return a list, the first element of which is $base.net and has a network object with the first state of the network, second element ($toggles) is the toggle array.60 61 67 get.slice.networks(networkDynamic, start=min(get.change.times(networkDynamic),end=max(get.change.times(networkDynamic),time.step=1,duration=1, rule="any"):: return a list with a series of networks produced by network.extract. Allow specifying a series of onsets, termini instead of / in addition to start,step,duration,end ? 62 63 === Some alternate name ideas ==64 65 nDToSpells66 67 as.nd.spells68 68 69 69 … … 72 72 Should we use "fake" S3 method names to be consistent? (i.e. networkDynamic.spell.list) 73 73 74 Is it better to pass in a network object to be populated , or specify full list of network options (directed,bipartite,etc)?74 Is it better to pass in a network object to be populated YES, or specify full list of network options (directed,bipartite,etc)? 75 75 76 76 For matrix input formats, better to assume column order, or allow specifying column indicies/names? … … 78 78 Preferred format for returned data objects? (array, matrix, data.frame)? 79 79 80 Censoring behavior (Inf should not automatically be censored, right) 80 Censoring behavior (Inf should not automatically be censored, right) change to start.censored, end.censored. 81 81 82 82 Implement for multiple head/tail set, or just return error? … … 90 90 Support for non-numeric,non integer input ids. '''pid=attrName''' Sort into alphabetic order, assign to ids 1:n 91 91 92 Remove: to-toggle methods. 93 94 Add "include.censoring=T" attribute 92 95 93 96 … … 100 103 101 104 105