uphist | R Documentation |
uphist is merely a wrapper around the base hist function, which adds the ability to limit the upper value on the x-axis. With fisheries data it is surprisingly common to have data that has a very few extreme values that can obscure a standard plot of the data. The data are only truncated within the uphist function so any other analyses will be on all available data. If a maximum value is selected which accidently eliminates all available data the script stops with an appropriate warning. If a value is selected which fails to eliminate any data then all data are used.
uphist(x, maxval = NA, ...)
x |
the vector of values to be plotted as a histogram |
maxval |
the maximum value to be retained in the plotted data |
... |
all the other arguments used by the base hist function |
nothing, but it does plot a histogram
## Not run:
x <- rlnorm(5000, meanlog=2, sdlog=1)
hist(x,breaks=30,main="",xlab="log-normal values")
uphist(x,breaks=30,main="",xlab="log-normal values",maxval=100)
uphist(x,breaks=30,main="",xlab="log-normal values",maxval=1000)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.