Description Usage Arguments Value Examples
Disk Usage of Specific Object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | disk_usage(object, full_data)
## Default S3 method:
disk_usage(object, full_data)
## S3 method for class 'gam'
disk_usage(object, full_data)
## S3 method for class 'ggplot'
disk_usage(object = ggplot2::last_plot(), full_data)
## S3 method for class 'glm'
disk_usage(object, full_data)
## S3 method for class 'lm'
disk_usage(object, full_data)
|
object |
Different types, including |
full_data |
Full data that the data passed into |
A binary data matrix.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | library(mgcv)
dat <- gamSim(1, n = 400, dist = "normal", scale = 2)
b <- gam(y ~ s(x0) + s(x1) + s(x2) + s(x3), data = dat)
disk_usage(b, dat)
dat <- gamSim(1, n = 25000, dist = "normal", scale = 20)
bs <- "cr"
k <- 12
b <- bam(y ~ s(x0, bs = bs) + s(x1, bs = bs) + s(x2, bs = bs, k = k) +
s(x3, bs = bs),
data = dat[sample(nrow(dat), size = 10000),])
disk_usage(b, dat)
if (requireNamespace("MASS", quietly = TRUE)) {
utils::data(anorexia, package = "MASS")
anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt),
family = gaussian, data = anorexia[ anorexia$Prewt > 70.25,])
disk_usage(anorex.1, full_data = anorexia)
disk_usage(list(data = anorex.1$data), full_data = anorexia)
}
if (requireNamespace("MASS", quietly = TRUE)) {
utils::data(anorexia, package = "MASS")
anorex.1 <- lm(Postwt ~ Prewt + offset(Prewt), data = anorexia)
disk_usage(anorex.1, full_data = anorexia)
disk_usage(list(model = anorex.1$model), full_data = anorexia)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.