Transform a R base code into a Shiny app, problems with the parameters of functions

if data is reactive then you would reference it with data()
but this is a guess because you don't provide the minimal code to understand your issue.
See this guide for help in getting the best help, and good luck
FAQ: How to do a minimal reproducible example ( reprex ) for beginners