Try this:
eapply(environment(), dim)
On Wed, Feb 10, 2010 at 9:41 PM, andrew <andrewjohnroyal at gmail.com>
wrote:> Hello r-help-archive list,
>
> I have an algorithm that is fairly slow and I was wondering whether my
> problem if it was an indexing going out of bounds and forcing the
> creation of a new vector. ?Basically, I want to check the dimensions
> of all of my vectors before and after the algorithm runs:
>
> I want something like
>
> mapply(dim, ls())
>
> but this just finds the dimension of the character array of the name
> of the R object, not the actual size of the vector that has the same
> name.
>
> Any thoughts on how to do this please?
>
> Regards,
>
> Andrew.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>