@@ -154,8 +154,8 @@ load.static.corr.by.overlap <- function(mode, window.sizes, overlap, measure, we
154154#
155155# returns: a vector of values representing the desired series.
156156# ##############################################################################
157- load.static.corr.scenes <- function (weights , measure , arc = NA , vol = NA )
158- { table.file <- get.path.stat.table(object = " corr" , mode = " scenes" , net.type = " static" , weights = weights , arc = arc , vol = vol )
157+ load.static.corr.scenes <- function (weights , measure , arc = NA , vol = NA , filtered )
158+ { table.file <- get.path.stat.table(object = " corr" , mode = " scenes" , net.type = " static" , weights = weights , arc = arc , vol = vol , filtered = filtered )
159159 # TODO adjust object in above call
160160 tmp.tab <- as.matrix(read.csv(table.file , header = TRUE , check.names = FALSE , row.names = 1 ))
161161 res <- tmp.tab [measure ,]
@@ -236,7 +236,7 @@ load.static.nodelink.stats.by.overlap <- function(object, mode, window.sizes, ov
236236#
237237# returns: a vector representing the link/node values for the specified measure.
238238# ##############################################################################
239- load.static.nodelink.stats.scenes <- function (object , weights , measure , arc = NA , vol = NA , filtered = FALSE )
239+ load.static.nodelink.stats.scenes <- function (object , weights , measure , arc = NA , vol = NA , filtered )
240240{ table.file <- get.path.stat.table(object = object , mode = " scenes" , net.type = " static" , weights = weights , arc = arc , vol = vol , filtered = filtered )
241241 tmp.tab <- as.matrix(read.csv(table.file , header = TRUE , check.names = FALSE , row.names = 1 ))
242242 res <- tmp.tab [,measure ]
@@ -277,8 +277,8 @@ generate.static.plots.single <- function(mode, window.sizes, overlaps)
277277 object <- " nodescomp"
278278
279279 # load the reference values (scene-based graph)
280- seg.occ.vals <- load.static.nodelink.stats.scenes(object = object , weights = " occurrences" , measure = meas.name , filtered = FALSE )
281- seg.dur.vals <- load.static.nodelink.stats.scenes(object = object , weights = " duration" , measure = meas.name , filtered = FALSE )
280+ seg.occ.vals <- load.static.nodelink.stats.scenes(object = object , weights = " occurrences" , measure = meas.name , filtered = " unfiltered " )
281+ seg.dur.vals <- load.static.nodelink.stats.scenes(object = object , weights = " duration" , measure = meas.name , filtered = " unfiltered " )
282282 seg.vals <- list ()
283283 seg.vals [[1 ]] <- seg.occ.vals [! is.na(seg.occ.vals )]
284284 seg.vals [[2 ]] <- seg.dur.vals [! is.na(seg.dur.vals )]
@@ -502,8 +502,8 @@ generate.static.plots.multiple <- function(mode, window.sizes, overlaps)
502502 object <- " graphcomp"
503503
504504 # load the reference values (scene-based graph)
505- seg.occ.vals <- load.static.graph.stats.scenes(object = object , measure = meas.name , weights = " occurrences" )
506- seg.dur.vals <- load.static.graph.stats.scenes(object = object , measure = meas.name , weights = " duration" )
505+ seg.occ.vals <- load.static.graph.stats.scenes(object = object , measure = meas.name , weights = " occurrences" , filtered = " unfiltered " )
506+ seg.dur.vals <- load.static.graph.stats.scenes(object = object , measure = meas.name , weights = " duration" , filtered = " unfiltered " )
507507
508508 # retrieve the window.size data series
509509 tlog(5 ," Gathering and plotting data by window.size" )
@@ -669,7 +669,7 @@ generate.static.plots.corr <- function(mode, window.sizes, overlaps)
669669 object <- " graph"
670670
671671 # load the reference values (scene-based graph)
672- seg.vals <- load.static.corr.scenes(weights = " occurrences" , measure = meas.name )
672+ seg.vals <- load.static.corr.scenes(weights = " occurrences" , measure = meas.name , filtered = " unfiltered " )
673673
674674 for (weights in c(" duration" ," occurrences" ))
675675 { if (weights == " duration" )
@@ -828,9 +828,9 @@ generate.static.plots.ranks <- function(mode, window.sizes, overlaps)
828828 object <- " nodepairs"
829829
830830 # load the reference values (scene-based graph)
831- seg.occ.vals <- load.static.nodelink.stats.scenes(object = object , weights = " occurrences" , measure = meas.name , filtered = FALSE )
831+ seg.occ.vals <- load.static.nodelink.stats.scenes(object = object , weights = " occurrences" , measure = meas.name , filtered = " unfiltered " )
832832 seg.occ.ranks <- rank(seg.occ.vals , ties.method = " min" )
833- seg.dur.vals <- load.static.nodelink.stats.scenes(object = object , weights = " duration" , measure = meas.name , filtered = FALSE )
833+ seg.dur.vals <- load.static.nodelink.stats.scenes(object = object , weights = " duration" , measure = meas.name , filtered = " unfiltered " )
834834 seg.dur.ranks <- rank(seg.occ.vals , ties.method = " min" )
835835
836836 for (weights in c(" duration" ," occurrences" ))
@@ -929,8 +929,8 @@ generate.static.plots.tfpn <- function(mode, window.sizes=NA, overlaps=NA)
929929
930930 # load the reference values (scene-based graph)
931931 data0 <- cbind(
932- sapply(1 : ncol(ms ), function (i ) load.static.graph.stats.scenes(object = object , weights = " occurrences" , measure = ms [m ,i ])),
933- sapply(1 : ncol(ms ), function (i ) load.static.graph.stats.scenes(object = object , weights = " duration" , measure = ms [m ,i ]))
932+ sapply(1 : ncol(ms ), function (i ) load.static.graph.stats.scenes(object = object , weights = " occurrences" , measure = ms [m ,i ], filtered = " unfiltered " )),
933+ sapply(1 : ncol(ms ), function (i ) load.static.graph.stats.scenes(object = object , weights = " duration" , measure = ms [m ,i ], filtered = " unfiltered " ))
934934 )
935935
936936 # generate a plot for each window size value
@@ -1071,7 +1071,8 @@ generate.static.plots.all <- function(mode, window.sizes, overlaps)
10711071# filtered: whether to use the filtered version of the graph.
10721072# ##############################################################################
10731073generate.static.plots.scene <- function (arc = NA , vol = NA , filtered = FALSE )
1074- { tlog(3 ," Generating plots for the " ,if (filtered ) " filtered" else " unfiltered" ," scene-based graphs" )
1074+ { filt.txt <- if (filtered ) " filtered" else " unfiltered"
1075+ tlog(3 ," Generating plots for the " ,filt.txt ," scene-based graphs" )
10751076 mode <- " scenes"
10761077 wmodes <- c(" occurrences" ," duration" )
10771078 col <- ATT_COLORS_FILT [if (filtered ) " Keep" else " Discard" ]
@@ -1097,7 +1098,7 @@ generate.static.plots.scene <- function(arc=NA, vol=NA, filtered=FALSE)
10971098 { tlog(4 ," Dealing with weights=" ,wmode )
10981099
10991100 # load pre-computed values (scene-based graph)
1100- vals <- load.static.nodelink.stats.scenes(object = object , weights = wmode , measure = meas.name , arc = arc , vol = vol , filtered = filtered )
1101+ vals <- load.static.nodelink.stats.scenes(object = object , weights = wmode , measure = meas.name , arc = arc , vol = vol , filtered = filt.txt )
11011102 # remove possible NAs
11021103 vals <- vals [! is.na(vals )]
11031104 # vals <- vals[vals>0] # remove the zeroes?
@@ -1212,7 +1213,7 @@ generate.static.plots.evol <- function(data, arcs, filtered)
12121213 }
12131214
12141215 # init other variables
1215- tlog(3 ," Generating " ,emode ," -based evolution plots for the " ,if ( filtered ) " filtered " else " unfiltered " ," scene-based graphs" )
1216+ tlog(3 ," Generating " ,emode ," -based evolution plots for the " ,filt.txt ," scene-based graphs" )
12161217 mode <- " scenes"
12171218 wmodes <- c(" occurrences" ," duration" )
12181219 col <- ATT_COLORS_FILT [if (filtered ) " Keep" else " Discard" ]
@@ -1234,7 +1235,7 @@ generate.static.plots.evol <- function(data, arcs, filtered)
12341235 for (i in 1 : length(items ))
12351236 { vals [i ] <- load.static.graph.stats.scenes(object = object , weights = wmode , measure = meas.name ,
12361237 arc = if (arcs ) i else NA , vol = if (arcs ) NA else items [i ],
1237- filtered = filtered )
1238+ filtered = filt.txt )
12381239 }
12391240
12401241 # generate barplots
0 commit comments