diff --git a/server.R b/server.R index 6bf086176d346283b522f4a6be0e9d449516afa5..e9ea8940ac2d6fa58213d1d1e45098f7845cbab5 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),