General Data Usage

du(..., full_data)

Arguments

...

a set of objects to obtain data usage.

full_data

Full data that the data passed into object was derived from

Value

A data matrix of percentages.

Examples

## an example with offsets from Venables & Ripley (2002, p.189) if (requireNamespace("MASS", quietly = TRUE)) { utils::data(anorexia, package = "MASS") sub_anor = anorexia[anorexia$Prewt > 73,] anorex.1 <- glm(Postwt ~ Prewt + Treat + offset(Prewt), family = gaussian, data = anorexia[anorexia$Prewt > 70.25,]) anorex.2 <- glm(Postwt ~ Prewt + offset(Prewt), family = gaussian, data = anorexia) du(anorex.1, anorex.2, sub_anor, full_data = anorexia) library(ggplot2) library(dplyr) g = anorexia %>% filter(Prewt > 75 & Postwt < 100) %>% ggplot(aes(x = Prewt, y = Postwt, colour = Treat)) g2 = anorexia %>% ggplot(aes(x = Prewt, y = Postwt)) + geom_point() + geom_line(data = sub_anor, aes(size = Treat)) du(g, g2, full_data = anorexia) du(g, g2, anorex.1, anorex.2, list(data = sub_anor), full_data = anorexia) }
#> #> Attaching package: ‘dplyr’
#> The following object is masked from ‘package:nlme’: #> #> collapse
#> The following objects are masked from ‘package:stats’: #> #> filter, lag
#> The following objects are masked from ‘package:base’: #> #> intersect, setdiff, setequal, union
#> Warning: Layer data is not implemented for disk_usage
#> Warning: Layer data is not implemented for disk_usage
#> Treat Prewt Postwt #> 1 0.6 1.0 1.0 #> 2 0.6 1.0 1.0 #> 3 0.6 1.0 1.0 #> 4 0.4 0.8 0.8 #> 5 0.6 1.0 1.0 #> 6 0.6 1.0 1.0 #> 7 0.6 1.0 1.0 #> 8 0.6 1.0 1.0 #> 9 0.6 1.0 1.0 #> 10 0.6 1.0 1.0 #> 11 0.6 1.0 1.0 #> 12 0.6 1.0 1.0 #> 13 0.6 1.0 1.0 #> 14 0.6 1.0 1.0 #> 15 0.2 0.6 0.6 #> 16 0.6 1.0 1.0 #> 17 0.6 1.0 1.0 #> 18 0.6 1.0 1.0 #> 19 0.6 1.0 1.0 #> 20 0.6 1.0 1.0 #> 21 0.6 1.0 1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