Skip to contents

Looks for header field lines (see header_field_lines()) in the first 30 lines of the file. Documentation comments such as roxygen blocks, YAML metadata fields (e.g. author: in an R Markdown document or a YAML config), and markdown syntax are not considered headers.

Usage

has_header(file)

Arguments

file

Character. Path to file.

Value

Logical. TRUE if file has a header.