Learn R Programming

pkglite (version 0.2.3)

file_spec: Create a file specification

Description

Specify which files to include

Usage

file_spec(
  path,
  pattern = NULL,
  format = c("binary", "text"),
  recursive = TRUE,
  ignore_case = TRUE,
  all_files = FALSE
)

Value

A file specification object.

Arguments

path

Path relative to the package root), for example, "inst/".

pattern

Regular expression for matching the file names.

format

File format type, one of "binary" or "text".

recursive

List files in the sub-directories?

ignore_case

Should pattern-matching be case-insensitive?

all_files

List all files including the invisible ones?

Specification

The contents of this section are shown in PDF user manual only.

Details

Most of the parameters are passed through list.files().

Examples

Run this code
file_spec(
  "R/",
  pattern = "\\.R$", format = "text",
  recursive = FALSE, ignore_case = TRUE, all_files = FALSE
)

Run the code above in your browser using DataLab