R: Reading the files of a directory

Reading the files of a directory {Rfast} | R Documentation

## Reading the files of a directory

### Description

Reading the files of a directory.

### Usage

    read.directory(path.directory)
    read.examples(path.man)

### Arguments

`path.directory` | The full path to the directory. For example: \"C:\Users\username\Documents\R\Rfast_1.8.0\R\"
`path.man` | The full path to the directory with the Rd files in it. For example: \"C:\Users\username\Documents\R\Rfast_1.8.0\man\\"

### Details

For function \"read.directory\": Takes as an argument a full path to a directory and returns the names of the files.

For function \"read.examples\": Takes as an argument a full path to the directory of the Rd files. If you don't want the program to read any file add at the top of the file the attribute "%[dont read]".

### Value

For function \"read.directory\": The names of the files.

For function \"read.examples\": a list with 2 fields

`examples` | A character vector with the examples of each Rd file.
`files` | A character vector with the name of the file that each examples belongs.
`long_lines` | A character vector with the name of the file that has large examples.

You can choose which files not to read for both R and Rd. You must add in the first line of the file in comment the "attribute" "%[dont read]". Finally, that function wil return in the result a list of which files had this attribute.

### Author(s)

R implementation and documentation: Manos Papadakis <papadakm95@gmail.com>.

### See Also

`AddToNamespace, sourceR, sourceRd, checkRd, checkExamples`

### Examples

    # for example: path="C:\some_file\"
    # system.time( read.directory(path) )
    # system.time( list.dirs(path) )

    # for example: path.man="C:\some_file\man\"
    # system.time( read.examples(path.man) )
    # system.time( read.examples(path.man,dont.read=c("somef_1.Rd",...,"somef_n.Rd") ) )

[Package Rfast version 2.0.4 Index]