Displaying 1 result from an estimated 1 matches for "daymonth".
Did you mean:
bymonth
2012 Jul 19
1
problem replacing NA's in a dataset (10% remain after removal attempt)
...een 7 and 12 depending on the month
the data was collected
#fillCH4 is a column containing CH4 flux data that I am trying to gap-fill
#night_median and day_median are 1x6 vectors with the median flux values
for each month
temp<-hourly.data[hourly.data$month==7,]
darkmonth<-(temp$filPFD==0)
daymonth<-(temp$filPFD>0)
temp[is.na(temp[darkmonth,"fillCH4"]),"fillCH4"]<-night_median[1]
temp[is.na(temp[daymonth,"fillCH4"]),"fillCH4"]<-day_median[1]
hourly.data[hourly.data$month==7,"fillCH4"]<-temp$fillCH4
This code replaces the major...