Spaces:
Sleeping
Sleeping
hot fix projection points
Browse filesReject previous PR.
Hot fix:
- Select 1-2 projections points error
- Reduced window indices are already a date
- r_shiny_app/server.R +10 -8
r_shiny_app/server.R
CHANGED
|
@@ -745,16 +745,18 @@ shinyServer(function(input, output, session) {
|
|
| 745 |
# Create a reduced window list
|
| 746 |
reduced_window_list <- vector(mode = "list", length = length(idx_window_limits)-1)
|
| 747 |
# Populate the first element of the list with the idx of the first window.
|
| 748 |
-
reduced_window_list[[1]]
|
| 749 |
-
|
|
|
|
|
|
|
| 750 |
# Populate the rest of the list
|
| 751 |
-
|
|
|
|
| 752 |
reduced_window_list[[i]]<- c(
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
| 756 |
-
|
| 757 |
-
)
|
| 758 |
}
|
| 759 |
reduced_window_list
|
| 760 |
})
|
|
|
|
| 745 |
# Create a reduced window list
|
| 746 |
reduced_window_list <- vector(mode = "list", length = length(idx_window_limits)-1)
|
| 747 |
# Populate the first element of the list with the idx of the first window.
|
| 748 |
+
reduced_window_list[[1]] = c(
|
| 749 |
+
isolate(tsdf())$timeindex[unlist_window_indices[idx_window_limits[1]+1]],
|
| 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 |
})
|