From 1b4662a6e652b7284821884201c1659d386b51f2 Mon Sep 17 00:00:00 2001 From: Midoux Cedric <cedric.midoux@irstea.fr> Date: Tue, 19 Jun 2018 14:11:45 +0200 Subject: [PATCH] multi-axes --- server.R | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/server.R b/server.R index 6bf0861..e9ea894 100644 --- a/server.R +++ b/server.R @@ -719,6 +719,13 @@ shinyServer title = "Setting : " , width = NULL, status = "primary", + checkboxGroupInput( + "acpAxes", + label = "Axes : ", + choices = seq(10), + selected = c(1, 2), + inline = TRUE + ), selectInput( "acpDist", label = "Distance : ", @@ -768,8 +775,10 @@ shinyServer }) output$acp <- renderPlot({ - validate(need(data16S(), - "Requires an abundance dataset")) + validate( + need(data16S(), "Requires an abundance dataset"), + need(length(input$acpAxes) == 2, "Requires two projections axes") + ) p <- plot_samples( data16S(), ordination = ordinate( @@ -777,7 +786,8 @@ shinyServer method = input$acpMethod, distance = input$acpDist ), - axes = c(1, 2), + axes = as.numeric(input$acpAxes), + #c(1, 2), color = checkNull(input$acpCol), replicate = checkNull(input$acpRep), shape = checkNull(input$acpShape), -- GitLab