lsos | R Documentation |
A better object list
lsos(pattern="", envir=NULL, pos = 1, order.by="Size", decreasing=TRUE, head=TRUE, n=10,noShow="",exact=FALSE)
pattern |
character; the pattern to search for in the object list |
envir |
environment; the environment to list |
pos |
integer; environment position |
order.by |
character; field name to order object list by. Options are "Type", "Size", "PrettySize", "Rows", "Columns", "Value". |
decreasing |
logical; if TRUE, objects are listed in decreasing order |
head |
logical; if TRUE, only the first ‘n’ objects are listed |
n |
integer; number of items to list when ‘head’ is specified |
noShow |
character vector; fields to not show. Can be any combination of "type", "size", "pretty", "dim", "vals". |
exact |
logical; only show items that match 'pattern' exactly. |
A simple procedure to list objects matching ‘pattern’ in enviroment at ‘pos’, including details on objects type, size, and dimensions.
data frame;
Type |
Object class/type |
Size |
Size of the object (bits) |
PrettySize |
Size of the object in nearest major unit |
Rows |
Number of rows in the object |
Columns |
Number of columns in the object |
Procedure was authored by Dirk Eddelbuettel and Tony Breyal in the StackOverflow Forum:
http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session
It has been modified by A.H.Wright.
#Load LAMBDAR library(LAMBDAR) #Add some things to the an environment param.env<-new.env(parent=environment()) assign("x",runif(1),envir=param.env) assign("y",runif(1E5),envir=param.env) assign("z",runif(1E2),envir=param.env) assign("string","Methinks it is like a weasel",envir=param.env) assign("im",matrix(runif(1E6),1000,1000),envir=param.env) assign("bigmat",matrix(runif(1E8),10000,10000),envir=param.env) #Show the parameter space variables lsos(envir=param.env) #Only show the type and pretty size lsos(envir=param.env, noShow=c("size","dim","vals"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.