lastn: Re-execute the last n lines in the interactive console.

Description Usage Arguments Details

View source: R/lastn.r

Description

This function will ignore any instances of lastn itself, so that running lastn(2) after x <- 1 lastn(1) x <- x + 1 will result in x = 2, not x = 4 (because x gets re-initialized to 1).

Usage

1
lastn(n, verbose = FALSE, eval = TRUE)

Arguments

n

numeric. The last n lines to execute.

verbose

logical. Whether or not to display the lines getting executed as a message. Default is FALSE (i.e., do not display).

eval

logical. Whether to run the string of code that will be executed, or merely return the character containing its contents.

Details

There are also helper functions last1, last2, ... last9 which call this function with n = 1, 2, ... 9 respectively.

Note: This function will also ignore past ed commands.


robertzk/productivus documentation built on March 19, 2018, 12:21 p.m.