Value of Last Evaluated Expression

The functon returns the value of the last evaluated top-level expression, which is always assigned to .Last.value (in package:base).

Keywords
programming
Usage
ans()
Details

This function retrieves .Last.value. For more details see .Last.value.

Value

.Last.value

See Also

.Last.value, eval

Aliases
  • ans
Examples
  2+2                  # Trivial calculation...
  ans()                # See the answer again

  gamma(1:15)          # Some intensive calculation...
  fac14 <- ans()       # store the results into a variable

  rnorm(20)            # Generate some standard normal values
  ans()^2              # Convert to Chi-square(1) values...
  stem(ans())          # Now show a stem-and-leaf table
Documentation reproduced from package gdata, version 2.18.0, License: GPL-2

Community examples

Looks like there are no examples yet.