Description Usage Arguments Value Author(s) Examples
Calculates most common contingeny scores
1 | fdbk_dt_contscores(CONTTABLE, meltTable = T)
|
CONTTABLE |
data.table with colums hit,miss,corrneg,false and additional columns (output of fdbk_dt_conttable(_2thrs)) |
meltTable |
if TRUE (default) melt output so that there is one 'scores' column and one 'scorename' column |
by |
stratify contingency entries by these columns |
data.table with one column of score names and one column of scores values
Felix <felix.fundel@dwd.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | require(ggplot2)
fnames = system("ls ~/examplesRfdbk/*/synop/verSYNOP.*",intern=T)
cond = list(veri_description="grepl('forecast',veri_description)",
veri_forecast_time="veri_forecast_time%in%c(2400,4800,7200,9600,12000,14400,16800)")
columnnames = c("obs","veri_data","varno","veri_model","veri_forecast_time","statid","veri_initial_date")
DT = fdbk_dt_multi_large(fnames,cond,columnnames,20)
thrs = list('29'=list('lower'=c(.8,.6),'upper'=c(Inf,.9)),
'3'=list('lower'=c(-5,0,5),'upper'=c(Inf,Inf,Inf)))
CONTTABLE = fdbk_dt_conttable_2thrs(DT,thrs,by=c("veri_model","veri_forecast_time","varno"),cores=2,incores=3)
SCORES = fdbk_dt_contscores(CONTTABLE)
ggplot(SCORES,aes(x=veri_forecast_time,y=scores,color=thr,linetype=veri_model))+
geom_line()+
geom_point()+
facet_grid(scorename~varno,scale="free_y")+
theme_bw()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.