ps() Attributes Vector

 psAttributes.names <- c("thread id",
                         "elapsed time",
                         "cpu time",
 psAttributes <-  2^(c((1:length(psAttributes.names))-1))
 names(psAttributes) <- psAttributes.names
The use of the values 2^(c((1:length(psAttributes.names))-1)) allows us to do relatively quick OR(|)ing of the values to include. The user can specify the attributes s/he wants in the output in the following way
 ps(attributes=c("thread id", "frames"))
is mapped to
  val = sum(psAttributes[attributes])
 else if(is(attributes,"numeric")) {
   # check the values agains those in psAttributes
    stop("incorrect values passed as attributes to ps")
   val = sum(attributes)
thread id
the thread name used internally and by which the thread can be referenced. This is also the value in the thread object's name slot.
elapsed time
the length of time since the creation of the thread
cpu time
the length of time for the evaluation of this thread
the input connection for this thread, typically NULL.
the output connection for this thread
the error connection for this thread on which warnings and errors are printed.
the current command or if this is too difficult, the command that constituted the first task for this thread.
session frames and/or databases associated with this thread. Each thread will have at least one of these databases for its own use.
the identifier of the database to which toplevel assignments in this frame are committed.

Last modified: Thu Feb 6 09:53:00 1997