countLines             package:ShortRead             R Documentation

_C_o_u_n_t _l_i_n_e_s _i_n _a_l_l (_t_e_x_t) _f_i_l_e_s _i_n _a _d_i_r_e_c_t_o_r_y _w_h_o_s_e _f_i_l_e _n_a_m_e
_m_a_t_c_h_e_s _a _p_a_t_t_e_r_n

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

     'countLines' visits all files in a directory path 'dirPath' whose
     base (i.e., file) name matches 'pattern'. Lines in the file are
     counted as the number of new line characters.

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

     countLines(dirPath, pattern=character(0), ..., useFullName=FALSE)

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

 dirPath: A character vector (or other object; see methods defined on
          this generic) giving the directory path (relative or
          absolute) of files whose lines are to be counted.

 pattern: The ('grep'-style) pattern describing files whose lines are
          to be counted. The default ('character(0)') results in line
          counts for all files in the directory.

     ...: Additional arguments, passed internally to list.files. See
          'list.files'.

useFullName: A 'logical(1)' indicating whether elements of the returned
          vector should be named with the base (file) name (default;
          'useFullName=FALSE') or the full path name
          ('useFullName=TRUE').

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

     A named integer vector of line counts. Names are paths to the
     files whose lines have been counted, excluding 'dirPath'.

_A_u_t_h_o_r(_s):

     Martin Morgan

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

     sp <- SolexaPath(system.file('extdata', package='ShortRead'))
     countLines(analysisPath(sp))
     countLines(experimentPath(sp), recursive=TRUE)
     countLines(experimentPath(sp), recursive=TRUE, useFullName=TRUE)

