convertToShortString: Converts any R object to a descriptive string so it can be used in messages.
Description
Atomics: If of length 0 or 1, they are basically printed as they are.
Numerics are formated with num.format.
If of length greater than 1, they are collapsed witd , and clipped.
so they do not become excessively long.
All others: Currently, only their class is simply printed
like .
Lists: The mechanism above is applied (non-recursively) to their elements.
The result looks like this:
a = 1, = 2, b = , c = .