R/simple.freqpoly.R

##' make a simple freqpoly and histogram
##'
##' @param x data
##' @param ... passed to hist
##' @return NULL
##'
##' @export
"simple.freqpoly" <-
function (x,...) {

tmp<-hist(x,probability=FALSE,...)
lines(c(min(tmp$breaks),tmp$mids,max(tmp$breaks)),c(0,tmp$counts,0),type="l")
}

Try the UsingR package in your browser

Any scripts or data that you put into this service are public.

UsingR documentation built on March 18, 2022, 7:32 p.m.