I have a column within a dataframe with numbers that looks like this below
City Temperature
Edmonton, Alberta 4.1,13.6,15.2,15.7,14.2,15.2,16,14.2,17,13.1
Edmonton, Alberta 15,18.2,14.8,16.5,14.6,16.9,14.3,17.5,13,15.8
Edmonton, Alberta 15.8,17.9,16.9,15.1,13.2,13.1,16.8,12.4,14.7,15.6
Edmonton, Alberta 14.3,17.3,14.6,17.3,14.8,14,15.4,14.1,16,15.4
My objective is to read the data in Temperature
column and create two additional columns that stores the Minimum and Maximum temperatures like this.
City Temperature Min Max
Edmonton, Alberta 4.1,13.6,15.2,15.7,14.2,15.2,16,14.2,17,13.1 4.1 16
Edmonton, Alberta 15,18.2,14.8,16.5,14.6,16.9,14.3,17.5,13,15.8 13 18.2
Edmonton, Alberta 15.8,17.9,16.9,15.1,13.2,13.1,16.8,12.4,14.7,15.6 12.4 17.9
Edmonton, Alberta 14.3,17.3,14.6,17.3,14.8,14,15.4,14.1,16,15.4 14.1 17.3
I tried the simple min(df$Temperature[1])
function but it didnt work. So not sure how to deal with this data, any advise or suggestion is much appreciated.