My reactive expression produces a vector of numeric values. Is there a way that I can save the previous rendered values and re-use it the next time? I tried to create an additional reactive expression to save the values and then call it again when using the first reactive expression but that causes the following error:
Error in : evaluation nested too deeply: infinite recursion / options(expressions=)?
I cannot upload my entire example since it is a survey, which is kind of confidential. However, I am trying to give insights into my server.R file.
yvals <- reactive({...})
xvals <- c(...) #some default values to start with
xvals <- reactive({
dat <- data.frame(xvals(), yvals())
....
print(xvals)
})
The issue is that yvals is based on the inputs of ui.R. However, xvals is not (at least not directly). So when xvals is updating it should take the old/previous values as input. I'm sorry for the mess - I'm aware that it is hard to help me without reproducible example. But basically, I just want to fix the previous reactive result and re-use it the next time.