Error in in (B[1] > min(datasel) & B[1] < max(datasel)){ :
missing value where TRUE/FALSE is needed
This comes from line 216 of grid2dloess as a result of object 'B' being NA at the time it is tested in this IF statement. I think there may be a structural issue in the function causing this to happen as line 198 conducts a try() attempt and assigns it to 'B', which is then assigned to be NA in lines 200-202 if an error results from the try() on line 198. Thus, an NA is passed as 'B' in the if(flagout){ statement on line 215 (and by default this is TRUE), which then yields the aforementioned error. It seems that something needs to be rewritten here to accommodate an NA 'B' being passed to line 216.
When running interp_pdt() I got this error:
Error in in (B[1] > min(datasel) & B[1] < max(datasel)){ : missing value where TRUE/FALSE is needed
This comes from line 216 of grid2dloess as a result of object 'B' being NA at the time it is tested in this IF statement. I think there may be a structural issue in the function causing this to happen as line 198 conducts a try() attempt and assigns it to 'B', which is then assigned to be NA in lines 200-202 if an error results from the try() on line 198. Thus, an NA is passed as 'B' in the if(flagout){ statement on line 215 (and by default this is TRUE), which then yields the aforementioned error. It seems that something needs to be rewritten here to accommodate an NA 'B' being passed to line 216.
basko1 <- read_etuff('159907_2011_110503_eTUFF.txt') pdt <- get_pdt(basko1) head(pdt) PdtTempAvg <- (pdt$PdtTempMax + pdt$PdtTempMin)/2 pdt$PdtTempAvg <- PdtTempAvg head(pdt)
pdt_interp <- interp_pdt(pdt)