Learn R Programming

berryFunctions (version 1.21.2)

lsMem: Show memory size of objects in MB

Description

Show memory size of the biggest objects in MB. Helps you find the biggest memory killers.

Usage

lsMem(n = 6, pos = 1, ...)

Arguments

n

Number of Objects to be shown separately. The rest is combined into "sum rest". DEFAULT: 6

pos

Environment where ls looks for objects.

Further arguments passed to ls

Value

Named vector with object sizes in MB (MegaBytes)

References

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

See Also

object.size, ls

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
## excluded from CRAN check  - I forgot why, but there's probably a good reason
lsMem()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab