X-Git-Url: https://git.auder.net/img/rock_paper_scissors_lizard_spock.gif?a=blobdiff_plain;f=pkg%2FR%2FForecast.R;h=274f50eb7896511eca82cbbed8f7fdbae5c10575;hb=841b7f5a10742afa28707ebf7dca273b38d8b8e4;hp=57817e7ba75fb6955cafdb6bfab3e0a33ed403e5;hpb=469529710f56c790ae932b45d13fed2e34bcabf2;p=talweg.git diff --git a/pkg/R/Forecast.R b/pkg/R/Forecast.R index 57817e7..274f50e 100644 --- a/pkg/R/Forecast.R +++ b/pkg/R/Forecast.R @@ -25,31 +25,33 @@ Forecast = setRefClass( callSuper(...) }, + getSize = function() + { + "Number of individual forecasts" + + length(pred) + }, append = function(new_serie, new_params, new_index) { "Obtain a new pair (serie, params)" pred[[length(pred)+1]] <<- list("serie"=new_serie, "params"=new_params, "index"=new_index) }, - getSize = function() - { - length(pred) - }, getSerie = function(index) { - "Get serie values at specified index" + "Serie values at specified index" pred[[index]]$serie }, getParams = function(index) { - "Get params at specified index" + "Params at specified index" pred[[index]]$params }, getIndexInData = function(index) { - "Get (day) index in data where prediction took place" + "(day) Index in data where prediction took place" pred[[index]]$index }