saveCalls Returns character vector containing all recursive subproblems

saveCalls(filename)

Arguments

filename

the file you saved in capture.output

Value

Character vector containing every recursive call

Details

Use this function in conjunction with capture.output and recursiveCalls. Call capture.output where first parameter is calling recursiveCalls on any recursive function and second parameter is the file name you would like to output it to.

Examples

capture.output(recursiveCalls(fib,10), file = "output.txt") fibResult <- saveCalls("output.txt") newlist1 <- createList(10) capture.output(recursiveCalls(fib_memoized,10,newlist1), file = "output.txt") memoizedResult <- saveCalls("output.txt")