statnet / network
Showing 1 of 1 files from the diff.

@@ -560,14 +560,14 @@
Loading
560 560
         if (all(RAlengths==2)){
561 561
           # assume default weight of 1
562 562
           # convert to data.frame by first unlisting and dumping into 3 col matrix
563 -
           edgeData <- as.data.frame(matrix(unlist(lapply(dyadList,function(x){
563 +
           edgeData <- as.data.frame(stringsAsFactors=TRUE,matrix(unlist(lapply(dyadList,function(x){
564 564
             c(as.numeric(x[1:2]),1)})),
565 565
             nrow=length(dyadList),ncol=3,byrow=TRUE))
566 566
567 567
           if(verbose) print('weights ommited from arcs/edges lines, assuming weight of 1')
568 568
         } else {
569 569
         # create a data frame from the (possibly ragged) rows of the dyadList
570 -
         edgeData<-as.data.frame(fillMatrixFromListRows(dyadList))
570 +
         edgeData<-as.data.frame(stringsAsFactors=TRUE,fillMatrixFromListRows(dyadList))
571 571
         # convert to appropriate class, have to convert to character first because it is a factor and NA will be recoded wrong
572 572
         edgeData[,1]<-as.numeric(as.character(edgeData[,1])) 
573 573
         edgeData[,2]<-as.numeric(as.character(edgeData[,2]))
@@ -845,7 +845,7 @@
Loading
845 845
    temp <- networksData[[i]]
846 846
    isDynamic<-FALSE
847 847
    if(!is.null(vertex)){  
848 -
      if (nrow(as.data.frame(vertex)) == network.size(temp)) {
848 +
      if (nrow(as.data.frame(stringsAsFactors=TRUE,vertex)) == network.size(temp)) {
849 849
        # set the vertex names to match names in file
850 850
        temp <- set.vertex.attribute(temp, "vertex.names",
851 851
                                     as.character(vertex[as.numeric(vertex[,1]),2]))
@@ -977,7 +977,7 @@
Loading
977 977
    }else{
978 978
      warning("null network title")
979 979
    }
980 -
    if(nrow(as.data.frame(vertex))== network.size(temp)){ #should i be doing this? why don't these numbers match all time
980 +
    if(nrow(as.data.frame(stringsAsFactors=TRUE,vertex))== network.size(temp)){ #should i be doing this? why don't these numbers match all time
981 981
      temp <- set.vertex.attribute(temp,"vertex.names",as.character(vertex[as.numeric(vertex[,1]),2]))
982 982
    }
983 983
    
Files Coverage
R 71.72%
src 71.73%
Project Totals (18 files) 71.73%
1
comment: false
2

3
coverage:
4
  status:
5
    project:
6
      default:
7
        target: auto
8
        threshold: 1%
9
        informational: true
10
    patch:
11
      default:
12
        target: auto
13
        threshold: 1%
14
        informational: true
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading