| readRprofmem | R Documentation |
Reads and parses an Rprofmem log file that was created by
utils::Rprofmem().
readRprofmem(pathname, as = c("Rprofmem", "fixed", "raw"), drop = 0L, ...)
pathname |
The Rprofmem log file to be read. |
as |
Specifies in what format data should be returned.
If |
drop |
Number of levels to drop from the top of the call stack. |
... |
Not used |
An Rprofmem data.frame or a character vector (if as is "raw"
or "fixed").
An Rprofmem data.frame has columns what, bytes, and trace, with:
what: (character) type of memory event;
either "alloc" or "new page"
bytes: (numeric) number of bytes allocated or NA_real_
(when what is "new page")
trace: (list of character vectors) zero or more function names
Ref. 1: https://github.com/HenrikBengtsson/Wishlist-for-R/issues/25
file <- system.file("extdata", "example.Rprofmem.out", package = "profmem")
raw <- readRprofmem(file, as = "raw")
cat(raw, sep = "\n")
profmem <- readRprofmem(file, as = "Rprofmem")
print(profmem)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.