I have code that runs in a loop to generate a function that has values assigned every multiple of a user-supplied step size. I want to copy the final function "value-wise" to a different function so that I can run the loop again (overwriting the dummy function) with new initial conditions and compare the plots. The naive
r1 = r code seems to pass the functions by reference: when the code has finished running, all of the functions are linked as
r1 = r2 = r3 = r. How do I "clone" the output lists without maintaining this unwanted linkage?
As a side note, I am not sure what to call the object I have created; it is generated by a loop assigning values by
r[i] = .... Is this a list, an array, or a function?