Hello!
I've been struggling all morning with this. I wanted to practice a bit with visualisations in R with a very basic dataset: one column is for "days", one column is for "total study hours" (expressed in hours, minutes and seconds although seconds are always at zero).
I've loaded the dataset in RStudio and the study hours column was identified as "character" even if the format is different. The format I need is HH:MM and I need it in a way that can be represented as data points on a line chart! (the dataset does contain some "0" values, I assumed that the software with still consider them as part of the data - why wouldn't they?) So far, al I got is a flat line!
I've tried everything:
- hms()
- as.character.Date()
- strptime()
- format()
- apparently there is a "as.time()" function but I could not find it
- difftime()
Can anyone help me? The documentation online is not really helpful and since I'm a beginner in R (I started one week ago), I'm quite desperate!
Thank you in advance for your answers!