PU
Size: a a a
PU
Н
PD
PD
ЮМ
ЮМ
v <- c("A","B","C","D")
times <- 4
foo <- paste0(rep(v, each = times), collapse = "")
stop_vec <- cumsum(rep(times, length(v)))
library(stringr)
str_sub(string = foo,
start = stop_vec + 1 - times,
end = stop_vec)
IS
Н
AS
Н
Н
PU
PD
t1 = Sys.time()
Sys.sleep(3)
t2 = Sys.time()
basetime <- as.POSIXct("1970-01-01 00:00:00")
my_delta_pos <- basetime + difftime(t2, t1)
my_delta_str <- format(my_delta_pos, '%H:%M:%S')
print(my_delta_str)
#> [1] "00:00:04”
AS
lubridate()
PU
AS
IS
t1 = Sys.time()
Sys.sleep(3)
t2 = Sys.time()
round(t2 - t1, 0) %>%
hms::as_hms()
AS
Н