Debounce and throttle are used to slow down a reactive expression. For example, suppose we are using the invalidation check for a reactive expression and error indications are prompted unnecessarily. We can use debounce and throttle to make expressions such as these slow down and wait for intermediate expressions to complete their calculations. The syntaxes of both of these are as follows:
debounce(r, millis, priority = 100, domain = getDefaultReactiveDomain()) throttle(r, millis, priority = 100, domain = getDefaultReactiveDomain())
Here, r is the reactive expression that invalidates too often. millis is the time window used by debounce/throttle, and priority sets the observer's priority. For example, if we want to add debounce to an expression, we can do it as follows:
plot_iris<- plot(iris$Sepal.Length,iris$Sepal.Width) ) %>% debounce(1000...