adjustDate {DataMetProcess} | R Documentation |
Fix the time zone
Description
Allows you to correct the timezone based on a date column and another time column
Usage
adjustDate(data = NULL, col_date = NULL, col_hour = NULL, fuso = NULL)
Arguments
data |
Data frame containing the data |
col_date |
Column containing the dates |
col_hour |
Column containing the time. It must be in the format "hh", "hh:mm", or "hh:mm:ss"; only the hours "hh" will be used for conversion. |
fuso |
Time zone for correction. Query OlsonNames() |
Value
Data frame with the corrected timezone
Examples
address <-
base::system.file("extdata",
"ex1_inmet.CSV",
package = "DataMetProcess")
df <-
read.table(
address,
h=TRUE,
sep = ";",
dec = ",",
skip = 8,
na.strings = -9999,
check.names = FALSE
)
df$Data = as.Date(df$Data,format = "%d/%m/%Y")
df <-
adjustDate(df,
colnames(df)[1],
colnames(df)[2],
fuso = "America/Bahia")
head(df[1:2])
[Package DataMetProcess version 1.0.2 Index]