getwd                  package:base                  R Documentation

_G_e_t _o_r _S_e_t _W_o_r_k_i_n_g _D_i_r_e_c_t_o_r_y

_D_e_s_c_r_i_p_t_i_o_n:

     'getwd' returns an absolute filename representing the current
     working directory of the R process; 'setwd(dir)' is used to set
     the working directory to 'dir'.

_U_s_a_g_e:

     getwd()
     setwd(dir)

_A_r_g_u_m_e_n_t_s:

     dir: A character string.

_V_a_l_u_e:

     'getwd' returns a character vector, or 'NULL' if the working
     directory is not available.

     'setwd' returns the current directory before the change,
     invisibly.  It will give an error if it does not succeed.

_N_o_t_e:

     These functions are not implemented on all platforms.

_S_e_e _A_l_s_o:

     'list.files' for the _contents_ of a directory.

_E_x_a_m_p_l_e_s:

     (WD <- getwd())
     if (!is.null(WD)) setwd(WD)

