wrange: Round to integer

View source: R/wrange.R

wrangeR Documentation

Round to integer

Description

Create ylim value, including negative value, for barplot.

Usage

wrange(v)

Arguments

v

a numeric vector, or data.frame.

Value

a numeric vector for ylim aruguments of barplot

Examples

tN <- table(Ni <- stats::rpois(100, lambda = 5))
barplot(tN, col = rainbow(20), ylim = rsko::wrange(tN), main='long y-axis')

ziris <- rsko::zconv(iris, 1:4, 1)
dat <- ziris[c("1", "51", "101"),-5]
par(mfcol=c(1,3), mar=c(6,2,1,1))
 res <- lapply(seq(nrow(dat)), function(i){
 barplot(unlist(dat[i,]), ylim = wrange(dat), las=2)
 })


shkonishi/rsko documentation built on Feb. 21, 2023, 5:12 a.m.