ans: Value of Last Evaluated Expression

Description Usage Details Value Author(s) See Also Examples

View source: R/ans.R

Description

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

Usage

1
ans()

Details

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

Value

.Last.value

Author(s)

Liviu Andronic

See Also

.Last.value, eval

Examples

1
2
3
4
5
6
7
8
9
  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 documentation built on May 2, 2019, 5:49 p.m.