Returns a vector of two timings expressed in seconds: cpu and elapsed times in S-PLUS.
USAGE:
sys.time(expr)
REQUIRED ARGUMENTS:
expr
any S-PLUS expression.
VALUE:
a length 2 vector: the time required to evaluate the expression.
Times (in units of seconds) are
the cpu and and elapsed times in S-PLUS.
The expression is evaluated in the frame of the function calling
sys.time
, so the semantics of the expression should be the same
as if it had been evaluated directly, although the value of
the expression (unless it is an assignment) will be lost.
SEE ALSO:
EXAMPLES:
x <- rmvnorm(3000, d=10)
sys.time(for(i in 1:100) colVars(x))
sys.time(for(i in 1:100) apply(x, 2, var))