Hi all,
I'm trying to create an interactive dashboard. However, I have encountered some problems. What I aim to achieve is that the user can have two inputs, which will then be converted in to a scatterplot with only the data of these two inputs.
However, I get the following warning "Warning in if (input$country2 == "The Netherlands") { :
the condition has length > 1 and only the first element will be used "
A part of my code is below.
Thank you a lot in advance.
selectInput("country2", "Which countries would you like to see in the plot?",
choices =c("The Netherlands", "United States","Germany","India","China","Japan"), multiple = TRUE),
plotOutput("Money", click = "moneyclick1")
output$Money <- renderPlot(
if(input$country2 == "The Netherlands" && input$country2 == "Germany"){
ggplot(data = filter(survey_results_public, Country %in% c("Netherlands","Germany")), aes(WorkWeekHrs))+
geom_point(aes(y = ConvertedComp, alpha(0.7), color = Country))+
xlim(0,50)+
ylim(0,150000)
}