Find frequency of timestamp in a dataframe with a POSIXct date configuration. For that, use readRawFileBM to load data.

findFrequency(
  rawFileDatatable,
  shortUnitFormat = FALSE,
  timestampColumn = "TIMESTAMP"
)

Arguments

rawFileDatatable

datatable or path of data or data.frame of the rawfile. If a path is a path, run readRawFileBM function)

shortUnitFormat

If TRUE, change unit format to short format (e.g secs to s)

timestampColumn

Name of timestampColumn. By default, TIMESTAMP

Value

frequence name with value and unit

Examples

library(aigoual) # Data rawFilePath <- system.file("extdata/bm-cent_L03-atm/0_rawdata/F01-30s/", "lqu_bm-cent_L03-atm_F01-30s_2021_05_17_0000.dat", package = "aigoual") decC <- "." skipRow <- c(1,2) timestampColumn <- "TIMESTAMP" timestampFormat <- "%Y-%m-%d %H:%M:%S" timestampTZ <- "Africa/Algiers" rawFileDatatable <- readRawFileBM(fileInput=TRUE, rawFilePath,decC, skipRow,timestampColumn, timestampFormat,timestampTZ) data.table::setnames(rawFileDatatable,"TIMESTAMP","TEST") frequenceSelected <- findFrequency(rawFileDatatable,timestampColumn="TEST")