quantile , Apply() incompatibility with R/3.6.1-foss-2015a-bare
Hello,
I have been testing the R version R/3.6.1-foss-2015a-bare When using Apply() with the stats::quantile function I get an error: With R/3.2.0-foss-2015a-bare it worked fine
Error in UseMethod("quantile") :
no applicable method for 'quantile' applied to an object of class "c#('matrix', 'double', 'numeric')"
Here is some reproducible code:
library(multiApply)
library(startR)
ecmwf_path_hc <- paste0('/esarchive/exp/ecmwf/s2s-monthly_ensforhc/weekly_mean/$var$_f24h/$sdate$/$var$_$syear$.nc')
hcst<-Start(dat = ecmwf_path_hc,
var = 'tas',
#sdate = '20170105',#forecast.fulldate,
sdate = "20161222",
syear = 'all',
time ='all',
latitude = indices(1),
longitude = indices(1),
ensemble = 'all',
syear_depends = 'sdate',
return_vars = list(latitude = 'dat',
longitude = 'dat'),
retrieve = T)
terciles_hcst<-Apply(hcst,c('syear','ensemble'),quantile,c(1/3,2/3))[[1]]