lim | R Documentation |
‘lim’ returns a vector containing the minimum and the maximum values of all the values present in its arguments, omitting NA values. Useful to use automatically determine xlim's and ylim's for plots.
lim(...)
x |
A vector containing numeric values |
One (or more) vector(s) of numeric values, the minimum and the maximum of the inputs
x <- c(1,2,3,4,5,NA,7,8,9,NA,11,12) y <- x^2 z <- x^3 plot(x,y,xlim=lim(x),ylim=lim(y,z)) lines(x,z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.