Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ans

Value of Last Evaluated Expression


Description

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

Usage

ans()

Details

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

Value

.Last.value

Author(s)

Liviu Andronic

See Also

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

gdata

Various R Programming Tools for Data Manipulation

v2.18.0
GPL-2
Authors
Gregory R. Warnes, Ben Bolker, Gregor Gorjanc, Gabor Grothendieck, Ales Korosec, Thomas Lumley, Don MacQueen, Arni Magnusson, Jim Rogers, and others
Initial release
2017-06-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.