The name of the last used module.

.Last.name

Value

The name of the last used module.

Details

A module is considered used last if it has just been:

  • defined or imported with a name without special meaning and not reserved (see define),

  • made or touched with a non-reserved name.

Other actions on modules do not alter the value of .Last.name.

Warning

Do not assign to .Last.name in the workspace, because this will always mask the object of the same name in package:modulr.

See also

define.

Examples

define("foo", NULL, function() NULL)
#> [2017-06-21T21:58:23 UTC] Re-defining 'foo' ... OK
.Last.name
#> [1] "foo"
define("bar/test", NULL, function() NULL)
#> [2017-06-21T21:58:23 UTC] Defining 'bar/test' ... OK
.Last.name
#> [1] "foo"
make("bar/test")
#> [2017-06-21T21:58:23 UTC] Making 'bar/test' ... #> [2017-06-21T21:58:23 UTC] * Visiting and defining dependencies ... #> [2017-06-21T21:58:23 UTC] * Constructing dependency graph ... OK #> [2017-06-21T21:58:23 UTC] DONE ('bar/test' in 0.012 secs)
#> NULL
.Last.name
#> bar/test #> "bar/test"