'Execute and be able to edit each line in a function in real time, without debug?

suppose I have this function

function_to_run <- function(data){ 
     a = 2+data 
     b = 4+9 
     c = 0 
     a = a + b + c 
     return(a)
}

what I want to do is execute each line in the function one at a time and be able to change the values, for example say I execute the second line b=4+9 but while in the function I want to change that in real time to b=5+9 instead, is there a way to do this.

If I use debug it will just allow me to execute but I can't run it. thanks

r


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source