Execution Times

DESCRIPTION:

Returns a vector of 5 timings expressed in seconds: user, system and elapsed times in S-PLUS, and user and system times in child processes.

USAGE:

unix.time(expr) 

REQUIRED ARGUMENTS:

expr
any S-PLUS expression.

VALUE:

a length 5 vector: the time required to evaluate the expression. Times (in units of seconds) are the user, system and elapsed times in S-PLUS, plus user and system times taken in child processes, if any. The expression is evaluated in the frame of the function calling unix.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:

# time different sizes of a problem 
time.mat <- matrix(ncol=5, nrow=4) 
for(i in 1:4) 
        time.mat[i,] <- unix.time(sort(runif(10^i)))