Learn R Programming

plotrix (version 1.41)

last.call: Find the last call containing a specified string.

Description

last.call searches the command history for the last call that has a match to the string look.for. This is currently used to find plot calls, hence the default search string.

Usage

last.call(look.for="plot",look.back=10)

Arguments

look.for
The string that will be matched in identifying the last call.
look.back
How far to look back in the command history.

Value

  • The last call (as a character variable) that contains the string look.for.

See Also

legend.outside

Examples

Run this code
plot(rnorm(20),rnorm(20))
 if(dev.interactive()) last.call()

Run the code above in your browser using DataLab