read.directory: Reading the files of a directory

View source: R/system_and_package.R

Reading the files of a directoryR Documentation

Reading the files of a directory

Description

Reading the files of a directory.

Usage

read.examples(path.man,paths.full = FALSE)
read.directory(path.directory)

Arguments

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\\"

paths.full

Print or return the full paths.

path.directory

The full path to the directory.

Details

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.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.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") ) )

Rfast documentation built on April 3, 2025, 11:34 p.m.