peek_head: print the first lines of files

View source: R/funs.R

peek_headR Documentation

print the first lines of files

Description

print the first n lines of a file.

Usage

peek_head(path, n = 10, intern = FALSE)

Arguments

path

file path

n

number of lines to print

intern

a logical which indicates whether to capture the output as an R character vector or to print the output in the R console.

Examples

f <- system.file(package = "fpeek",
  "datafiles", "test-tab.csv")
peek_head(f, n = 4)
peek_head(f, n = 4, intern = TRUE)

fpeek documentation built on April 2, 2026, 5:07 p.m.