This server has been upgraded to version 12.6.4. Enjoy!

Commit 7891ea8c authored by dmattek's avatar dmattek

Modified alerts

parent 3870e872
...@@ -242,8 +242,10 @@ clustValid <- function(input, output, session, in.dataWide) { ...@@ -242,8 +242,10 @@ clustValid <- function(input, output, session, in.dataWide) {
# Thanks to isolate all mods in the left panel are delayed # Thanks to isolate all mods in the left panel are delayed
# until clicking the Plot button # until clicking the Plot button
loc.dist = isolate(calcDist()) loc.dist = isolate(calcDist())
validate( validate(
need(!is.null(loc.dist), "Nothing to plot. Load data first!") need(!is.null(loc.dist), "Nothing to plot. Load data first!"),
need(returnMaxNclust() < nrow(loc.dist), "Maximum number of clusters to conisder should be smaller than the number of time series.")
) )
loc.p = LOCnbclust(loc.dist, loc.p = LOCnbclust(loc.dist,
...@@ -273,8 +275,10 @@ clustValid <- function(input, output, session, in.dataWide) { ...@@ -273,8 +275,10 @@ clustValid <- function(input, output, session, in.dataWide) {
# Thanks to isolate all mods in the left panel are delayed # Thanks to isolate all mods in the left panel are delayed
# until clicking the Plot button # until clicking the Plot button
loc.dist = isolate(calcDist()) loc.dist = isolate(calcDist())
validate( validate(
need(!is.null(loc.dist), "Nothing to plot. Load data first!") need(!is.null(loc.dist), "Nothing to plot. Load data first!"),
need(returnMaxNclust() < nrow(loc.dist), "Maximum number of clusters to conisder should be smaller than the number of time series.")
) )
loc.p = LOCnbclust(loc.dist, loc.p = LOCnbclust(loc.dist,
...@@ -304,8 +308,6 @@ clustValid <- function(input, output, session, in.dataWide) { ...@@ -304,8 +308,6 @@ clustValid <- function(input, output, session, in.dataWide) {
# until clicking the Plot button # until clicking the Plot button
loc.part = calcDendCut() loc.part = calcDendCut()
loc.dm = in.dataWide() loc.dm = in.dataWide()
print(sum(is.na(loc.dm)))
validate( validate(
need(!is.null(loc.part), "Nothing to plot. Load data first!"), need(!is.null(loc.part), "Nothing to plot. Load data first!"),
...@@ -348,11 +350,13 @@ clustValid <- function(input, output, session, in.dataWide) { ...@@ -348,11 +350,13 @@ clustValid <- function(input, output, session, in.dataWide) {
# Check if required data exists # Check if required data exists
loc.part = calcDendCut() loc.part = calcDendCut()
# Rerun the PCA plot to obtain clour mapping of clusters in PCA and silhouette plot and match it with dendrogram colors. # Rerun the PCA plot to obtain clour mapping of clusters in PCA and silhouette plot and match it with dendrogram colors.
loc.map = plotClPCA() loc.map = plotClPCA()
validate( validate(
need(!is.null(loc.part), "Nothing to plot. Load data first!"), need(!is.null(loc.part), "Nothing to plot. Load data first!"),
need(!is.null(loc.map), "Nothing to plot. Load data first!") need(!is.null(loc.map), "Cannot assign colours to clusters. Possible NAs in the dataset!")
) )
# Determine cluster order of occurence from left to right in the dendrogram # Determine cluster order of occurence from left to right in the dendrogram
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment