Next: Scope (i.e., dealing with
Up: Working with objects
Previous: Working indirectly with objects
To list your objects, you have several options
- objects(pattern="track") # equivalent to
UNIX "ls *track*"
- objects() # lists all objects
- ls() # lists all objects
- lsf.str() # lists all functions with their arguments
- ls("package.fields") # lists all objects
in the fields library
Removing objects whose names follow a pattern
- remove(objects(pattern="track")) #remove
particular objects
Determining object size
- >object.size(my.object)
- use the format.bytes()
function to write out the size in more readable format
>format.bytes(object.size(my.object))
- use the ls.sizes()
function to find the largest N objects
>ls.sizes(top=15) # returns the largest 15
Thanks to Fang Chen for most of these tips.
Chris Paciorek
2006-04-02