I have imported data from excel. One of the columns is “Wait.Time” and it represents the amount of time a patient was waiting in hours:minutes:seconds format. When I imported the CSV file it logged this column as being of class “character”.
How do I convert this column’s values to just seconds so I can tell R to treat is as a numeric value? (e.g. 00:24:03 –> 1,443).
I tried this code:
library(chron)
df$Wait.Time <- chron(df$Wait.Time = time)
Which gave this error:
Error: unexpected '=' in "df$Wait.Time <- chron(df$Wait.Time ="