Answer by Florian for Get selected row value instead of number
I don't think you can. What you could do is write a reactive, where all modifications to your dataframe take place, before creating the datatable. An example:library(shiny)library(DT)ui <-...
View ArticleAnswer by Florian for Remove unused libraries python pyproject.toml
You can find obsolete dependencies by using deptry, a command line utility that checks for unused dependencies within a project's dependencies. It also checks for some other issues with the listed...
View ArticleAnswer by Florian for Nodepool in AKS not scaling down to 0 nodes?
In the end, adding a dedicated system node pool did not resolve the issue. Initially the metrics-server pods were moved to the new node pool, but they ended up in the application node pool again later,...
View ArticleHow to convert a Shiny app consisting of multiple files into an easily...
There are resources on how to create a Minimal, Complete, and Verifiable example in general on Stack Overflow, and on how to make a great R reproducible example. However, there are no similar...
View ArticleAnswer by Florian for Example of update_item in dynamodb boto3
Small update of Jam M. Hernandez Quiceno's answer, which includes ExpressionAttributeNames to prevent encoutering errors such as:"errorMessage": "An error occurred (ValidationException) when calling...
View ArticleAnswer by Florian for AWS Base Image Multiple Lambdas (dockerfile)
If you are using AWS CKD, you can overwrite it within fromImageAsset:import * as cdk from 'aws-cdk-lib';import { Construct } from 'constructs';import { Runtime } from 'aws-cdk-lib/aws-lambda';import...
View ArticleAnswer by Florian for Mutate multiple columns with a certain condition in R
With base R:dt <- read.table(text="M1 M2 M3 UCL1 2 3 1.5",header=T)ncols <- ncol(dt)dt <- cbind(dt, ifelse(subset(df, select=M1:M3) > dt[,"UCL"], "UP", "NULL"))colnames(dt)[ncols:ncol(dt)]...
View ArticleAnswer by Florian for Rapid Selection of points from large numpy array
I believe this does what you want, see also here:pos_array = np.array(pos_list)arr[pos_array[:,0], pos_array[:,1],pos_array[:,2]]Output:array([0.10539037, 0.17852727, 0.18794522, 0.04191294])Or, you...
View ArticleAnswer by Florian for Replace any single digit value to NA in a column...
Maybe like this:dt$column[nchar(dt$column)==1 & nchar(gsub('[[:digit:]]', '', dt$column))==0]=NAIf the string is a single character, and after replacing the digits it is zero characters long,...
View ArticleAnswer by Florian for R shinydashboard - show/hide multiple menuItems based...
Here is an idea for growing your sidebarMenu dynamically using renderUI and uiOutput. It is also fairly straightforward to convert to a for loop if your number of tabs...
View ArticleAnswer by Florian for How to make images clickable to display a subset...
It has been a while since I used Shiny so I may be a bit rusty. But here is a possible approach to tackling your issue: You could use a reactiveValue to keep track of which mood is selected, and update...
View ArticleAnswer by Florian for How to extract the values of dynamically generated...
You can get the value of a dynamically generated input as input[[paste0(input$selected_var[i],"_weight")]]`while you can get the array with selected check boxes simply with input$selected_var. A...
View ArticleAnswer by Florian for Store DenseVector in DataFrame column in PySpark
You could wrap the creation of the udf inside a function, so it returns the udf with your vector. An example is given below, hope this helps!import pyspark.sql.functions as Ffrom pyspark.ml.linalg...
View ArticleAnswer by Florian for Problem using selectInput to download multiple...
Instead of switch I would recommend you to use named choices in your selectInput. Then you could get it working as in the example below. Note that this might need some error handling (e.g. no columns...
View ArticleAnswer by Florian for Double Head Slider Input is not picking up all the...
I expect that the error is not in your slider, but in the way you filter. Note that a slider returns the minimum and maximum values selected, and not all values in its range. So here,input$key would...
View ArticleAnswer by Florian for in shiny, when i convert this logo to action button, a...
You could overwrite the background-color property by adding some additional CSS. Working example below, hope this helps!library(shiny)ui <- fluidPage( tags$a(href= NULL, tags$button(id =...
View ArticleAnswer by Florian for Fit 2 Graphs Side By Side in Shiny Navbar Page Without...
You can get the desired behavior by placing both columns in a fluidRow and removing the width=50% from the individual output objects. A working example is given below, hope this...
View ArticleAnswer by Florian for Show modal onclick plotly bar plot
You can use an observer and the event_data from your scatterchart to accomplish that. Working example below, hope this helps!library(shiny)library(plotly)df1 <- data.frame(x = 1:10, y = 1:10)df2...
View ArticleAnswer by Florian for How to change label color of textInput in Shiny Dashboard
In the case of the dateInput, the id is given to a div that wraps both the label and the input itself. In the case of the textInput however, the id is only passed to the input itself, and not to a div...
View ArticleDifference in environment when using 'docker build' or 'docker run'
I am starting to learn Docker, and I ran into some behavior I could not understand.I want to use conda inside my Docker container, but when using docker build . I ran into the error /bin/sh: 1: conda:...
View Article