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 on that platform.

     'setwd' returns 'NULL' 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)

