#' @export
plotCurves <- function(data, indices=seq_len(data$getSize()))
{
- yrange = quantile( range( sapply( indices, function(i) {
+ yrange = quantile( sapply( indices, function(i) {
serie = c(data$getCenteredSerie(i))
if (!all(is.na(serie)))
range(serie, na.rm=TRUE)
c()
- }) ), probs=c(0.05,0.95) )
+ }), probs=c(0.05,0.95) )
par(mar=c(4.7,5,1,1), cex.axis=1.5, cex.lab=1.5)
for (i in seq_along(indices))
{
sqrt( sum( (ref_serie - data$getCenteredSerie(i))^2 ) / L )
})
indices = sort(distances, index.return=TRUE)$ix[1:min(limit,length(distances))]
- yrange = quantile( range( ref_serie, sapply( indices, function(i) {
+ yrange = quantile( c(ref_serie, sapply( indices, function(i) {
ii = fdays_indices[i]
serie = c(data$getCenteredSerie(ii), data$getCenteredSerie(ii+1))
if (!all(is.na(serie)))