frk_summarise: Guess all structural characteristics of one or more flat...

Description Usage Arguments Value See Also Examples

View source: R/frk.R

Description

Runs all functions from the guess family to gather all structural characteristics of given file(s).

Usage

1
2
frk_summarise(path, pattern = NULL, recursive = FALSE, guess_max = 10,
  skip = NULL, verbose = FALSE, progress = TRUE)

Arguments

path

a character vector of full path names; the default corresponds to the working directory, getwd(). Tilde expansion (see path.expand) is performed. Missing values will be ignored.

pattern

an optional regular expression. Only file names which match the regular expression will be returned.

recursive

logical. Should the listing recurse into directories?

guess_max

Maximum number of records to use for guess

skip

atomic numeric specifying the number of lines to skip in each file. If NULL, it will be guessed.

verbose

Whether to output guess as message

progress

Show progress bar?

Value

A tibble whose lines stores the guesses for each file

See Also

guess_delim(), guess_col_names(), and the whole guess family

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
# Create sample files
file <- tempfile()
write.table(
  dplyr::storms, file, sep = "|", dec = ",",
  col.names = TRUE, row.names = FALSE)
file2 <- tempfile()
write_csv(dplyr::storms, file2)

# Run all guesses
summ <- frk_summarise(file)
str(summ)

# Run all guesses on multiple files
summ <- frk_summarise(c(file, file2))
str(summ)

## End(Not run)

Athospd/forkliftr documentation built on May 14, 2019, 9:42 a.m.