Sample of dataset Full sample can be download via this link
Date/Time,Hs,Hmax,Tp,Tz,Peak Direction,SST
1/01/2018 0:00,-99.9,-99.9,-99.9,-99.9,-99.9,-99.9
1/01/2018 0:30,0.513,0.81,10.315,4.748,-99.9,-99.9
1/01/2018 1:00,0.566,0.93,10.778,5.003,92,26.4
1/01/2018 1:30,0.557,0.85,9.984,4.99,91,26.4
Read in via this method, and all columns except date.time are numeric.
maloolaba.waves <- read.csv(file = "./data/mooloolaba_2018-01-01t00_00-2018-10-31t23_30.csv", header = T)
Function to remove rows containing -99.9.
maloo.RM.outlier <- maloolaba.waves[!(apply(maloolaba.waves, 1,
function(y) any(y == -99.9) )),]
Now when I do summary after removing value -99.9 I get this.
summary(maloo.RM.outlier)
Date.Time Hs Hmax
1/01/2018 1:00 : 1 Min. :-99.900 Min. :-99.900
1/01/2018 1:30 : 1 1st Qu.: 0.805 1st Qu.: 1.350
1/01/2018 10:00: 1 Median : 1.112 Median : 1.870
1/01/2018 10:30: 1 Mean : 1.234 Mean : 2.089
1/01/2018 11:00: 1 3rd Qu.: 1.608 3rd Qu.: 2.700
1/01/2018 11:30: 1 Max. : 4.257 Max. : 7.262
(Other) :14543
Tp Tz Peak.Direction SST
Min. :-99.900 Min. :-99.900 Min. : 5 Min. :19.80
1st Qu.: 7.529 1st Qu.: 5.035 1st Qu.: 91 1st Qu.:21.00
Median : 9.146 Median : 5.568 Median :105 Median :23.00
Mean : 9.245 Mean : 5.679 Mean :103 Mean :23.43
3rd Qu.: 10.903 3rd Qu.: 6.257 3rd Qu.:119 3rd Qu.:26.00
Max. : 21.121 Max. : 10.146 Max. :358 Max. :28.65
Yet when I look at the dataset for maloo.RM.outlier, there are no values -99.9, so I then searched.
which(maloo.RM.outlier$Hs == -99.9, arr.ind = T)
[1] 11501 13775
I have tried looking at the row numbered 11501 and 13775, no -99.9 values there. I have tried, clearing the global environment data, restarting the R session and nothing seems to fully get rid of the value -99.9 and the summary still says the minimum = -99.9. Does anyone know how to remove floating point values?