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.

     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)

