Is there a function that will recall the last line executed within an R script? For example, if such a function existed and was called "echoLast", I am interested in using this in the following manner:
y <-3,
whi <- 4,
x <- 5
wlo <- 6
sum <- y * whi + x * wlo
last.command <- echoLast()
print(paste(last.command,sum,y,whi,x,wlo))
which would result in output of:
"sum <- y * whi + x * wlo 32 2 1 5 6"
Thank you