Skip to content

Commit

Permalink
Calculate proper upper limit of OY for all if-cases
Browse files Browse the repository at this point in the history
References #82.
  • Loading branch information
mbojan committed Jun 18, 2024
1 parent 5b8d52c commit ddb0f45
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions R/degreedist.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,13 @@ degreedist.egor <- function(object, freq = FALSE, prob = !freq,
if(prob){
if(is.null(by)){
scaledeg <- sum(deg.ego)
deg.ego <- deg.ego/scaledeg
maxfreq <- max(deg.ego, na.rm = TRUE)
} else {
scaledeg <- rowSums(deg.ego)
deg.ego <- deg.ego/scaledeg
deg.ego <- deg.ego
maxfreq <- max(max(deg.ego, na.rm = TRUE))
beside <- TRUE
}
deg.ego <- deg.ego/scaledeg
}
maxfreq <- max(deg.ego, na.rm=TRUE)

if(plot){
if(brgmod) {
Expand Down

0 comments on commit ddb0f45

Please sign in to comment.