diff --git a/R/autoplot-density.R b/R/autoplot-density.R index 0591f0e1..8275db85 100644 --- a/R/autoplot-density.R +++ b/R/autoplot-density.R @@ -68,7 +68,8 @@ tidy_autoplot <- function(.data, .plot_type = "density", .line_size = .5, .point if(!attributes(.data)$tibble_type %in% c( "tidy_gaussian", "tidy_poisson","tidy_gamma","tidy_beta","tidy_f", "tidy_hypergeometric","tidy_lognormal","tidy_cauchy","tidy_chisquare", - "tidy_weibull","tidy_uniform","tidy_logistic","tidy_exponential" + "tidy_weibull","tidy_uniform","tidy_logistic","tidy_exponential", + "tidy_empirical" )){ rlang::abort("The data passed must come from a `tidy_` distribution function.") } @@ -119,6 +120,8 @@ tidy_autoplot <- function(.data, .plot_type = "density", .line_size = .5, .point paste0("Location: ", atb$.location, " - Scale: ", atb$.scale) } else if(atb$tibble_type == "tidy_exponential"){ paste0("Rate: ", atb$.rate) + } else if(atb$tibble_type == "tidy_empirical"){ + paste0("Empirical - No params") } ) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index daf68713..fa8a618f 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 2.0.2 pkgdown_sha: ~ articles: getting-started: getting-started.html -last_built: 2022-01-20T12:57Z +last_built: 2022-01-20T14:34Z diff --git a/docs/reference/tidy_autoplot-1.png b/docs/reference/tidy_autoplot-1.png index 12d4d232..c2c3d3b6 100644 Binary files a/docs/reference/tidy_autoplot-1.png and b/docs/reference/tidy_autoplot-1.png differ diff --git a/docs/reference/tidy_beta.html b/docs/reference/tidy_beta.html index a27dc54f..be1fb89f 100644 --- a/docs/reference/tidy_beta.html +++ b/docs/reference/tidy_beta.html @@ -143,16 +143,16 @@
tidy_cauchy()
#> # A tibble: 50 x 7
-#> sim_number x y dx dy p q
-#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 1 1 -0.436 -289. 8.26e- 4 0.00637 -Inf
-#> 2 1 2 -0.403 -283. 2.75e-18 0.00663 -15.6
-#> 3 1 3 0.191 -277. 1.23e-19 0.00692 -7.76
-#> 4 1 4 -5.37 -271. 1.27e-19 0.00723 -5.13
-#> 5 1 5 -0.587 -265. 8.65e-19 0.00758 -3.81
-#> 6 1 6 -0.339 -259. 1.97e-18 0.00796 -3.01
-#> 7 1 7 -2.13 -253. 0 0.00837 -2.47
-#> 8 1 8 -0.488 -247. 9.87e-19 0.00884 -2.08
-#> 9 1 9 0.938 -240. 1.89e-18 0.00936 -1.78
-#> 10 1 10 -3.91 -234. 2.86e-20 0.00994 -1.54
+#> sim_number x y dx dy p q
+#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 1 1 0.452 -122. 2.52e- 4 0.00637 -Inf
+#> 2 1 2 0.911 -118. 2.06e- 4 0.00663 -15.6
+#> 3 1 3 0.154 -115. 5.73e-20 0.00692 -7.76
+#> 4 1 4 -1.30 -111. 0 0.00723 -5.13
+#> 5 1 5 0.790 -108. 0 0.00758 -3.81
+#> 6 1 6 41.9 -105. 0 0.00796 -3.01
+#> 7 1 7 0.458 -101. 2.33e-18 0.00837 -2.47
+#> 8 1 8 -1.46 -98.0 6.09e-19 0.00884 -2.08
+#> 9 1 9 0.233 -94.6 0 0.00936 -1.78
+#> 10 1 10 -120. -91.2 1.48e-18 0.00994 -1.54
#> # ... with 40 more rows
tidy_chisquare()
#> # A tibble: 50 x 7
-#> sim_number x y dx dy p q
-#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 1 1 1.73 -1.78 0.00161 0 0
-#> 2 1 2 0.570 -1.45 0.00774 0 0.00178
-#> 3 1 3 3.13 -1.13 0.0279 0 0.00711
-#> 4 1 4 1.38 -0.802 0.0759 0 0.0160
-#> 5 1 5 0.971 -0.476 0.157 0 0.0285
-#> 6 1 6 0.844 -0.150 0.249 0 0.0445
-#> 7 1 7 1.79 0.176 0.312 0 0.0640
-#> 8 1 8 0.518 0.501 0.325 0 0.0872
-#> 9 1 9 1.20 0.827 0.302 0 0.114
-#> 10 1 10 1.61 1.15 0.268 0 0.144
+#> sim_number x y dx dy p q
+#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 1 1 1.25 -2.42 0.00103 0 0
+#> 2 1 2 0.173 -2.15 0.00272 0 0.00178
+#> 3 1 3 0.294 -1.89 0.00649 0 0.00711
+#> 4 1 4 1.48 -1.62 0.0140 0 0.0160
+#> 5 1 5 4.51 -1.36 0.0274 0 0.0285
+#> 6 1 6 1.47 -1.10 0.0488 0 0.0445
+#> 7 1 7 0.680 -0.834 0.0790 0 0.0640
+#> 8 1 8 3.21 -0.570 0.117 0 0.0872
+#> 9 1 9 0.528 -0.306 0.159 0 0.114
+#> 10 1 10 8.08 -0.0425 0.199 0 0.144
#> # ... with 40 more rows
tidy_exponential()
#> # A tibble: 50 x 7
-#> sim_number x y dx dy p q
-#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 1 1 3.57 -0.864 0.00242 0 0
-#> 2 1 2 1.53 -0.755 0.00720 0 0.0206
-#> 3 1 3 1.48 -0.647 0.0189 0 0.0417
-#> 4 1 4 0.761 -0.538 0.0438 0 0.0632
-#> 5 1 5 0.277 -0.429 0.0896 0 0.0852
-#> 6 1 6 1.49 -0.321 0.163 0 0.108
-#> 7 1 7 0.211 -0.212 0.262 0 0.131
-#> 8 1 8 1.04 -0.104 0.378 0 0.154
-#> 9 1 9 0.989 0.00509 0.489 0 0.178
-#> 10 1 10 0.340 0.114 0.572 0 0.203
+#> sim_number x y dx dy p q
+#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 1 1 0.331 -0.854 0.00118 0 0
+#> 2 1 2 1.37 -0.729 0.00423 0 0.0206
+#> 3 1 3 0.148 -0.604 0.0130 0 0.0417
+#> 4 1 4 0.461 -0.479 0.0339 0 0.0632
+#> 5 1 5 1.87 -0.353 0.0764 0 0.0852
+#> 6 1 6 1.03 -0.228 0.149 0 0.108
+#> 7 1 7 0.793 -0.103 0.251 0 0.131
+#> 8 1 8 0.196 0.0221 0.373 0 0.154
+#> 9 1 9 4.39 0.147 0.491 0 0.178
+#> 10 1 10 2.63 0.272 0.581 0 0.203
#> # ... with 40 more rows
tidy_f()
#> # A tibble: 50 x 7
-#> sim_number x y dx dy p q
-#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 1 1 48.1 -2.11 4.31e- 1 0 0
-#> 2 1 2 0.783 664. 1.00e-18 0 0.00103
-#> 3 1 3 2.24 1329. 2.77e-19 0 0.00412
-#> 4 1 4 0.430 1995. 2.13e-19 0 0.00931
-#> 5 1 5 24.5 2661. 0 0 0.0166
-#> 6 1 6 0.123 3327. 0 0 0.0261
-#> 7 1 7 1.96 3993. 1.31e-19 0 0.0379
-#> 8 1 8 0.215 4658. 0 0 0.0521
-#> 9 1 9 0.273 5324. 0 0 0.0688
-#> 10 1 10 0.985 5990. 5.46e-19 0 0.0881
+#> sim_number x y dx dy p q
+#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 1 1 4.23 -4.39 0.00127 0 0
+#> 2 1 2 0.666 -0.909 0.119 0 0.00103
+#> 3 1 3 80.9 2.57 0.0839 0 0.00412
+#> 4 1 4 0.121 6.05 0.0260 0 0.00931
+#> 5 1 5 5.09 9.53 0.00653 0 0.0166
+#> 6 1 6 0.0246 13.0 0.000288 0 0.0261
+#> 7 1 7 1.15 16.5 0.00558 0 0.0379
+#> 8 1 8 1.24 20.0 0.00595 0 0.0521
+#> 9 1 9 0.752 23.4 0.00493 0 0.0688
+#> 10 1 10 0.00678 26.9 0.00664 0 0.0881
#> # ... with 40 more rows
tidy_gamma()
#> # A tibble: 50 x 7
-#> sim_number x y dx dy p q
-#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
-#> 1 1 1 0.743 -0.845 0.00148 0 0
-#> 2 1 2 4.04 -0.687 0.00751 0 0.0206
-#> 3 1 3 1.25 -0.528 0.0285 0 0.0417
-#> 4 1 4 0.832 -0.369 0.0817 0 0.0632
-#> 5 1 5 0.439 -0.210 0.179 0 0.0852
-#> 6 1 6 1.00 -0.0515 0.306 0 0.108
-#> 7 1 7 0.637 0.107 0.424 0 0.131
-#> 8 1 8 0.00306 0.266 0.500 0 0.154
-#> 9 1 9 0.584 0.425 0.533 0 0.178
-#> 10 1 10 0.570 0.584 0.536 0 0.203
+#> sim_number x y dx dy p q
+#> <fct> <int> <dbl> <dbl> <dbl> <dbl> <dbl>
+#> 1 1 1 0.224 -1.26 0.00114 0 0
+#> 2 1 2 0.668 -1.12 0.00321 0 0.0206
+#> 3 1 3 1.09 -0.975 0.00812 0 0.0417
+#> 4 1 4 0.818 -0.834 0.0185 0 0.0632
+#> 5 1 5 0.946 -0.692 0.0382 0 0.0852
+#> 6 1 6 0.273 -0.551 0.0710 0 0.108
+#> 7 1 7 0.256 -0.409 0.120 0 0.131
+#> 8 1 8 0.273 -0.267 0.183 0 0.154
+#> 9 1 9 0.105 -0.126 0.256 0 0.178
+#> 10 1 10 0.939 0.0157 0.326 0 0.203
#> # ... with 40 more rows