Return dimensions of arguments, or lengths if dim==NULL.

Description

Just a toy to return dim() when it's sensible and length() elsewise # items must be collection or list of character strings, e.g. output of ls()

Usage

1
lsdim(items)

Arguments

items

A vector of character strings identifying the objects of interest as would be returned by, e.g. ls(pattern="foo") or lstype("double") .

Value

A list, each element of which gives the object dimensions if there are any, and the length if not.

Author(s)

Carl Witthoft, carl@witthoft.com

See Also

dim , length,

Examples

1
2
3
x1<-1:10
x2<-matrix(1,3,4)
lsdim(c('x1','x2'))