This function returns a character string of user-defined length based on the current number of seconds since January 1st, 1970. It is useful for prototyping data storage pipelines where the actual file name may be unknown.
time_string(length)
length | Number of characters to make the string. |
---|
A character string based on the current time since January 1st, 1970.
time_string(length = 4)#> [1] "8633"time_string(length = 6)#> [1] "538633"# Will throw a warning time_string(length = 4646)#> Warning: Only 10 digits make up the number of seconds since January, 1970. Ignoring supplied length, and defaulting to 10 digits.#> [1] "1633538633"