Сделать так, чтобы два компонента программно занимали одинаковое положение x в окне?

Просто используйте подстроку:

datetimes <- c("2016-04-02 10:33:45 COT", "2016-04-02 22:19:24 COT" ,
               "2016-04-09 17:47:13 COT", "2016-04-13 16:56:23 COT")

as.POSIXct(substring(datetimes, 1, nchar(datetimes[1])-7))   

#[1] "2016-04-02 10:33:00 IST" "2016-04-02 22:19:00 IST" 
#    "2016-04-09 17:47:00 IST" "2016-04-13 16:56:00 IST"

# without timezone
format(substring(datetimes, 1, nchar(datetimes[1])-7), 
                 format='%Y-%m-%d %H:%M:%S', usetz = FALSE)
#[1] "2016-04-02 10:33" "2016-04-02 22:19" "2016-04-09 17:47" "2016-04-13 16:56"
0
задан OHHH 29 March 2019 в 10:32
поделиться