You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Failure(@test_makeAnnualStat.R#151): makeAnnualStat handles custom function and dots -------
RCMIP5:::vals(res1) not equal to ans$value
Mean relative difference: 0.2777778
array
The test code that gets executed:
years<-1850:1851llsize<-2d<- cmip5data(years, lonsize=llsize, latsize=llsize, loadAs="array")
# All data 1, except December, which is 2d$val<-array(1, dim=dim(d$val))
d$val[,,,round(d$time%%1, 3)==.958] <-2# Weights are all 1 except December, which is 11w<- c(rep(1, 11), 11)
res1<- makeAnnualStat(d, verbose=F, sortData=F, filterNum=T, FUN=weighted.mean, w)
...which (wrongly) returns 1.083, the unweighted mean.
...as far as I can see. The test code passes
weighted.mean
intomakeAnnualStat
and is getting back the unweighted mean.The text was updated successfully, but these errors were encountered: