range                  package:base                  R Documentation

_R_a_n_g_e _o_f _V_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     'range' returns a vector containing the minimum and maximum of all
     the given arguments.

_U_s_a_g_e:

     range(..., na.rm = FALSE)

     ## Default S3 method:
     range(..., na.rm = FALSE, finite = FALSE)

_A_r_g_u_m_e_n_t_s:

     ...: any 'numeric' objects.

   na.rm: logical, indicating if 'NA''s should be omitted.

  finite: logical, indicating if all non-finite elements should be
          omitted.

_D_e_t_a_i_l_s:

     'range' is a generic function: methods can be defined for it
     directly or via the 'Summary' group generic. For this to work
     properly, the arguments '...' should be unnamed.

     If 'na.rm' is 'FALSE', 'NA' and 'NaN' values in any of the
     arguments will cause 'NA' values to be returned, otherwise 'NA'
     values are ignored.

     If 'finite' is 'TRUE', the minimum and maximum of all finite
     values is computed, i.e., 'finite=TRUE' _includes_ 'na.rm=TRUE'.

     A special situation occurs when there is no (after omission of
     'NA's) nonempty argument left, see 'min'.

_R_e_f_e_r_e_n_c_e_s:

     Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) _The New S
     Language_. Wadsworth & Brooks/Cole.

_S_e_e _A_l_s_o:

     'min', 'max', 'Methods'.

_E_x_a_m_p_l_e_s:

     (r.x <- range(rnorm(100)))
     diff(r.x) # the SAMPLE range

     x <- c(NA, 1:3, -1:1/0); x
     range(x)
     range(x, na.rm = TRUE)
     range(x, finite = TRUE)

