mat_show_mem: Show memory usage, by object, or from workspace

View source: R/memory_show_check.R

mat_show_memR Documentation

Show memory usage, by object, or from workspace

Description

Show memory usage, by object, or from workspace

Usage

mat_show_mem(df_input, is_ls = FALSE, all.names = TRUE)

Arguments

df_input

input data. Can be a df, a list of objects, or a vector of characters. If empty, will evaluate ls()

is_ls

Is 'df_input' actually a list of characters (if yes, runs get() first)

all.names

Whether should use all.names when calling ls()

Examples

mat_show_mem()
mat_show_mem(freeny)
library(purrr)
library(dplyr)
library(tidyr)

iris_regs <- nest(iris, data=-Species) %>%
  mutate(reg_out = map(data, ~lm(Petal.Width~Petal.Length, data=as_tibble(.)))) %>%
  select(-data)
# DOES NOT WORK ANYMORE!?
# mat_show_mem(iris_regs$reg_out)

## Check a workspace
#mat_show_mem(ls(), is_ls=TRUE)

MatthieuStigler/matPkg documentation built on Sept. 19, 2024, 5:19 a.m.