file_info: Information about Data File

View source: R/functions.R

file_infoR Documentation

Information about Data File

Description

Provides information about data stored in file: columns, number of observations, range of timestamps.

Usage

file_info(dir, file)

Arguments

dir

character

file

character

Details

Provide information, such as number of entries, of specified files.

It is recommended that code that uses the returned information to alter or write tables, should explicitly check whether a table exists (column exists in the returned data.frame). For instance, a value of NA for min.timestamp would occur for a non-existing file, but also if the file could not be read for some reason.

Value

An object of type file_info, which is a data.frame with information such as whether a file exists, minimum and maximum timestamp, and more.

Author(s)

Enrico Schumann

See Also

ts_table

Examples

ts <- ts_table(1:3, as.Date("2018-12-3") + 1:3, columns = "A")
d <- tempdir()
write_ts_table(ts, file = "temp", dir = d)
file_info(d, "temp")

enricoschumann/tsdb documentation built on Feb. 27, 2023, 1:14 p.m.