@@ -5,8 +5,10 @@ ui_pca <- function() {
55 splitLayout(
66 verticalLayout(
77 fluidRow(
8- column(6 ,selectizeInput(ns(" pca_xaxis" ),label = " X axis:" ,choices = NULL )),
9- column(6 ,selectizeInput(ns(" pca_yaxis" ),label = " Y axis:" ,choices = NULL ))),
8+ column(6 ,selectizeInput(ns(" pca_xaxis" ),
9+ label = " X axis:" ,choices = NULL )),
10+ column(6 ,selectizeInput(ns(" pca_yaxis" ),
11+ label = " Y axis:" ,choices = NULL ))),
1012 plotOutput(ns(" pca_plot" ),width = " 100%" ,height = " 400px" )
1113 ),
1214 plotOutput(ns(" drivers_plot" ),width = " 100%" ,height = " auto" ),
@@ -26,14 +28,17 @@ server_pca <- function(id, selected_data, cluster_labels, cluster_colors) {
2628 observeEvent(pca_data(), {
2729pca_res <- pca_data()
2830pca_dims <- colnames(pca_res $ x )
29- updateSelectizeInput(session ," pca_xaxis" ,choices = pca_dims ,selected = " PC1" )
30- updateSelectizeInput(session ," pca_yaxis" ,choices = pca_dims ,selected = " PC2" )
31+ updateSelectizeInput(session ," pca_xaxis" ,
32+ choices = pca_dims ,selected = " PC1" )
33+ updateSelectizeInput(session ," pca_yaxis" ,
34+ choices = pca_dims ,selected = " PC2" )
3135 })
3236
3337output $ pca_plot <- renderPlot({
3438 req(input $ pca_xaxis )
3539 req(input $ pca_yaxis )
36- pca_scatterplot(pca_data(), cluster_labels(),cluster_colors ,input $ pca_xaxis ,input $ pca_yaxis )
40+ pca_scatterplot(pca_data(), cluster_labels(),
41+ cluster_colors ,input $ pca_xaxis ,input $ pca_yaxis )
3742 })
3843
3944output $ drivers_plot <- renderPlot({