misantamaria commited on
Commit
19b3dae
1 Parent(s): 04df557

hot fix projection points

Browse files

Reject previous PR.
Hot fix:
- Select 1-2 projections points error
- Reduced window indices are already a date

Files changed (1) hide show
  1. r_shiny_app/server.R +7 -7
r_shiny_app/server.R CHANGED
@@ -750,14 +750,14 @@ shinyServer(function(input, output, session) {
750
  isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[2]]]
751
  )
752
  # Populate the rest of the list
753
- for (i in 2:(length(idx_window_limits)-1)){
 
754
  reduced_window_list[[i]]<- c(
755
- #unlist_window_indices[idx_window_limits[i]+1],
756
- #unlist_window_indices[idx_window_limits[i+1]]
757
- isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[i]+1]],
758
- isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[i+1]]]
759
- )
760
- }
761
  reduced_window_list
762
  })
763
 
 
750
  isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[2]]]
751
  )
752
  # Populate the rest of the list
753
+ if (length(idx_window_limits) > 2) {
754
+ for (i in 2:(length(idx_window_limits)-1)){
755
  reduced_window_list[[i]]<- c(
756
+ isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[i]+1]],
757
+ isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[i+1]]]
758
+ )
759
+ }
760
+ }
 
761
  reduced_window_list
762
  })
763