home *** CD-ROM | disk | FTP | other *** search
-
- _C_o_n_d_i_t_i_o_n_a_l _E_l_e_m_e_n_t _S_e_l_e_c_t_i_o_n
-
- ifelse(test, yes, no)
-
- _D_e_s_c_r_i_p_t_i_o_n:
-
- ifelse returns a value with the same shape as test
- which is filled with elements selected from either yes
- or no depending on whether the element of test is TRUE
- or FALSE. If yes or no are too short, their elements
- are recycled.
-
- _E_x_a_m_p_l_e_s:
-
- x <- ifelse(x > 0, sqrt(x), 0)
-
-