convert_time: convert_time

Description Usage Arguments Details Examples

Description

Converts time in various formats to HH:MM

Usage

1
convert_time(year, month, day, time, latitude = NULL)

Arguments

year

numeric or character, year corresponding to time

month

numeric or character, month of time

day

numeric or character, day of time

time

character vector of representations of time

latitude

latitude of station for conversion of sunset/rise times

Details

Conversion of time to times in HH:MM format is based on the solar declination from the insol package if times specify 'sunset' or 'sunrise'. In addition, the string representations of 'morning', 'noon', 'afternoon', 'evening' are set (see example(convert_time))

Examples

1
2
time <- c('12PM', '12AM', 'sunrise', 'sunset','morning', 'noon',  'afternoon', 'evening', '12:00', '1:00', '13:13', '04:00')
cbind(time, convert_time(1815, 1, 1, time, latitude=45))

jonasbhend/pressurehelper documentation built on May 19, 2019, 7:27 p.m.