0

How do you convert a string of times (without dates) in hh:mm:ss format from a .csv into a vector of times in the same format in R using the hms() package?

I have tried the following: time <- as_hms(file$time) but I get the following error: Error: Lossy cast from <character> to <hms> at position(s) 140364, 140365, 140366, 140367, 140368, ... (and 2455 more).

The data are saved as hh:mm:ss time in the .csv file.

manro
  • 3,529
  • 2
  • 9
  • 22
JKO
  • 295
  • 1
  • 12

1 Answers1

0

Use parse_hms() rather than as_hms()

JKO
  • 295
  • 1
  • 12