Skip to content

Commit

Permalink
Update obtCount.R
Browse files Browse the repository at this point in the history
bug fix on obtCount function
  • Loading branch information
AlemuTA authored Nov 17, 2024
1 parent bdb1c2e commit f6959f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/obtCount.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' @return a list object contating class breaks, mid points and counts
#' @importFrom graphics hist
obtCount <- function(Y, w){
h = hist(Y, plot = FALSE,
nclass = if(is.null(w)) NULL else nclass = round(w*length(Y)))
nclass=if(is.null(w)) NULL else round(w*length(Y))
h = hist(Y, plot = FALSE, nclass=nclass)
list(breaks = h$breaks, mids = h$mids, counts = h$counts)
}
}

0 comments on commit f6959f0

Please sign in to comment.