On Thu, 19 Jul 2018, Rich Shepard wrote:
I have the date and elev columns converted from factors to date and numeric, respectively, but still have not learned how to convert the time.
With this dataframe structure, str(wy2018) 'data.frame': 12592 obs. of 3 variables: $ date: Date, format: "2017-10-01" "2017-10-01" ... $ time: chr "00:00" "00:30" "01:00" "01:30" ... $ elev: num 290 290 290 290 290 ... what is my syntax error using chron() to convert the time column? wy2018$time <- chron(times=wy2018$time) Error in convert.times(times., fmt) : format h:m:s may be incorrect In addition: Warning message: In unpaste(times, sep = fmt$sep, fnames = fmt$periods, nfields = 3) : 12592 entries set to NA due to wrong number of fields Adding a format as either %h:%m or just h:m makes no difference. Rich ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.