Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Plotly R + Shiny - plot doesn't refresh, but rather is plotted over

I am using plotly with R to make an app. The plot is produced and plotted, but when I make another selection to create another plot it is plotted above the existing one. How do I fix it? Desired behavior is to have old plot gone and only new being plotted.

App is here : https://iraklic.shinyapps.io/App01/

code is here

library(shiny)
library(plotly)
source(“volcanize.R”)

pathToFiles <- "."
fileNames <- list.files(pathToFiles, pattern = “_.txt”, recursive = FALSE, include.dirs = FALSE, full.names = TRUE)
fileList <- basename(fileNames)

ui <- fluidPage(
selectInput(inputId = “file”, label = “Select a file”, choices = fileList, selected = “”),
plotlyOutput(“vPlot”)
)

server <- function(input, output)
{
output$vPlot <- renderPlotly({volcanize(input$file)})
}

shinyApp (ui = ui, server = server)

======================
volcanize function returns plotly plot with return§.