Elegantly list objects in a R session.

lsos(
  pos = 1,
  pattern,
  order.by = "Size",
  decreasing = TRUE,
  head = TRUE,
  n = 10
)

Arguments

pos

Where to look for the object (see "Details" in base::get()'s documentation)

pattern

An optional regular expression to match names (utils::glob2rx() can be used to convert wildcard patterns to regular expressions)

order.by

Sort by "Size" (default), "Type", "Rows" or "Columns"

decreasing

Should the sorting be decreasing?

head

Should utils::head() function be used for printing?

n

How many lines utils::head() function should show?

References

http://stackoverflow.com/questions/1358003/tricks-to-manage-the-available-memory-in-an-r-session