Evaluate the size of each element contained in a model object.

weigh(x, threshold = 0, units = "MB", ...)

Arguments

x

A model object.

threshold

The minimum threshold desired for model component size to display.

units

The units in which to display the size of each component within the model object of interest. Defaults to MB. Other options include KB and GB.

...

Any additional arguments for weighing.

Value

Tibble with weights of object components in decreasing magnitude.

Examples

simulate_x <- matrix(runif(1e+6), ncol = 2) simulate_y <- runif(dim(simulate_x)[1]) lm_out <- lm(simulate_y ~ simulate_x) weigh(lm_out)
#> # A tibble: 16 x 2 #> object size #> <chr> <dbl> #> 1 terms 88.0 #> 2 qr.qr 44.0 #> 3 residuals 36.0 #> 4 fitted.values 36.0 #> 5 effects 8.00 #> 6 model.simulate_x 8.00 #> 7 model.simulate_y 4.00 #> 8 call 0.000560 #> 9 coefficients 0.000464 #> 10 qr.qraux 0.00008 #> 11 assign 0.000064 #> 12 qr.pivot 0.000064 #> 13 rank 0.000056 #> 14 qr.tol 0.000056 #> 15 qr.rank 0.000056 #> 16 df.residual 0.000056