#> xfun 0.48 2024-10-03 [2] CRAN (R 4.2.3)
#> yaml 2.3.10 2024-07-26 [2] CRAN (R 4.2.3)
#>
-#> [1] /private/var/folders/k6/l4mq9ctj3219429xnvqpdbxm8tckkx/T/RtmpGxN654/temp_libpath40902d57f086
+#> [1] /private/var/folders/k6/l4mq9ctj3219429xnvqpdbxm8tckkx/T/Rtmp2m6ADV/temp_libpath37143d897314
#> [2] /Library/Frameworks/R.framework/Versions/4.2/Resources/library
#>
#> ──────────────────────────────────────────────────────────────────────────────
diff --git a/docs/authors.html b/docs/authors.html
index 16d23ba..c460973 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -82,14 +82,14 @@ Citation
- Brunson J, Gracey J (2024).
+
Brunson J, Gracey J (2025).
ordr: A Tidyverse Extension for Ordinations and Biplots.
https://github.com/corybrunson/ordr, https://corybrunson.github.io/ordr/.
@Manual{,
title = {ordr: A Tidyverse Extension for Ordinations and Biplots},
author = {Jason Cory Brunson and John Gracey},
- year = {2024},
+ year = {2025},
note = {https://github.com/corybrunson/ordr, https://corybrunson.github.io/ordr/},
}
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml
index 2104d5e..632ea3f 100644
--- a/docs/pkgdown.yml
+++ b/docs/pkgdown.yml
@@ -4,4 +4,4 @@ pkgdown_sha: ~
articles:
cmds-variables: cmds-variables.html
ordr: ordr.html
-last_built: 2024-12-31T16:06Z
+last_built: 2025-01-01T15:53Z
diff --git a/docs/reference/biplot-stats.html b/docs/reference/biplot-stats.html
index b8ab8f7..46933cc 100644
--- a/docs/reference/biplot-stats.html
+++ b/docs/reference/biplot-stats.html
@@ -270,6 +270,8 @@ Convenience stats for row and column matrix factors
geom = "segment",
position = "identity",
referent = NULL,
+ ref_subset = NULL,
+ ref_elements = "active",
...,
show.legend = NA,
inherit.aes = TRUE
@@ -281,6 +283,8 @@ Convenience stats for row and column matrix factors
geom = "segment",
position = "identity",
referent = NULL,
+ ref_subset = NULL,
+ ref_elements = "active",
...,
show.legend = NA,
inherit.aes = TRUE
@@ -298,6 +302,8 @@ Convenience stats for row and column matrix factors
referent = NULL,
show.legend = NA,
inherit.aes = TRUE,
+ ref_subset = NULL,
+ ref_elements = "active",
...
)
@@ -313,6 +319,8 @@ Convenience stats for row and column matrix factors
referent = NULL,
show.legend = NA,
inherit.aes = TRUE,
+ ref_subset = NULL,
+ ref_elements = "active",
...
)
@@ -502,6 +510,11 @@ Arguments
The reference data set; see Details.
+ref_elements, ref_subset
+Analogues of elements
and subset
applied
+to referent
.
+
+
fun.lower, fun.upper, fun.offset
Functions used to determine the limits
of the rules and the translations of the axes from the projections of
diff --git a/docs/reference/figures/README-predictive biplot-1.png b/docs/reference/figures/README-predictive biplot-1.png
index 8a0610b..588ce49 100644
Binary files a/docs/reference/figures/README-predictive biplot-1.png and b/docs/reference/figures/README-predictive biplot-1.png differ
diff --git a/docs/reference/geom_rule.html b/docs/reference/geom_rule.html
index 1de4440..e36b719 100644
--- a/docs/reference/geom_rule.html
+++ b/docs/reference/geom_rule.html
@@ -280,7 +280,7 @@
Examples
geom_point(aes(size = stack.loss, alpha = sign(stack.loss))) +
scale_size_area() + scale_alpha_binned(breaks = c(-1, 0, 1)) +
stat_rule(
- geom = "rule", data = coef_data,
+ data = coef_data,
referent = stackloss_centered,
fun.offset = \(x) minabspp(x, p = .5)
)
diff --git a/docs/reference/ggbiplot-6.png b/docs/reference/ggbiplot-6.png
index 75f9b6a..464da77 100644
Binary files a/docs/reference/ggbiplot-6.png and b/docs/reference/ggbiplot-6.png differ
diff --git a/docs/reference/ggbiplot.html b/docs/reference/ggbiplot.html
index be7458e..14b941e 100644
--- a/docs/reference/ggbiplot.html
+++ b/docs/reference/ggbiplot.html
@@ -456,21 +456,13 @@ Examples
theme_bw() +
scale_color_brewer(type = "qual", palette = 2) +
geom_origin() +
- # FIXME: Include this only for testing.
- geom_cols_axis(
- subset = c(2, 4),
- aes(label = name, center = center, scale = scale)
- ) +
stat_cols_rule(
- .referent = "rows",
subset = c(2, 4),
aes(label = name, center = center, scale = scale)
) +
geom_rows_point(aes(color = Species), alpha = .5) +
expand_limits(x = c(-5, 5), y = c(-5, 5)) +
ggtitle("Predictive biplot of Anderson iris measurements")
-#> Warning: Ignoring unknown parameters: `.referent`
-#> `subset` will be applied after data are restricted to active elements.
#> `subset` will be applied after data are restricted to active elements.
diff --git a/docs/reference/stat_projection.html b/docs/reference/stat_projection.html
index 0550339..bc5ef7c 100644
--- a/docs/reference/stat_projection.html
+++ b/docs/reference/stat_projection.html
@@ -262,11 +262,12 @@ Examples
ggbiplot(iris_pca, aes(color = Species, label = name)) +
geom_rows_point() +
geom_cols_axis()
+
# project all cases onto all axes
iris_biplot + stat_rows_projection()
# project all cases onto select axes
-iris_biplot + stat_rows_projection(referent = c(2, 4))
+iris_biplot + stat_rows_projection(ref_subset = c(2, 4))
#> `subset` will be applied after data are restricted to active elements.
# project select cases onto all axes
@@ -274,10 +275,11 @@ Examples
#> `subset` will be applied after data are restricted to active elements.
# project select cases onto select axes
-iris_biplot + stat_rows_projection(subset = c(1, 51, 101), referent = c(2, 4))
+iris_biplot + stat_rows_projection(subset = c(1, 51, 101), ref_subset = c(2, 4))
#> `subset` will be applied after data are restricted to active elements.
#> `subset` will be applied after data are restricted to active elements.
+
# project select cases onto manually provided axes
iris_cols <- as.data.frame(get_cols(iris_pca))
iris_biplot + stat_rows_projection(subset = c(1, 51, 101), referent = iris_cols)
@@ -288,7 +290,7 @@ Examples
ggbiplot(iris_pca, ord_aes(iris_pca, color = Species, label = name)) +
geom_rows_point() +
geom_cols_axis() +
- stat_rows_projection(subset = c(1, 51, 101), referent = c(2, 4))
+ stat_rows_projection(subset = c(1, 51, 101), ref_subset = c(2, 4))
#> `subset` will be applied after data are restricted to active elements.
#> `subset` will be applied after data are restricted to active elements.
diff --git a/docs/reference/stat_rule-1.png b/docs/reference/stat_rule-1.png
index 7fe9ae5..e485007 100644
Binary files a/docs/reference/stat_rule-1.png and b/docs/reference/stat_rule-1.png differ
diff --git a/docs/reference/stat_rule.html b/docs/reference/stat_rule.html
index 0bd5c36..c6876f4 100644
--- a/docs/reference/stat_rule.html
+++ b/docs/reference/stat_rule.html
@@ -321,9 +321,11 @@ Examples
theme_bw() + theme_biplot() +
geom_rows_point(size = 4) +
geom_rows_point(elements = "score") +
- stat_cols_rule(aes(label = name), color = "#888888", num = 8L,
- fun.offset = \(x) minabspp(x, p = .2),
- text_size = 2.5, label_dodge = .02) +
+ stat_cols_rule(
+ aes(label = name), color = "#888888", num = 8L,
+ ref_elements = "score", fun.offset = \(x) minabspp(x, p = .1),
+ text_size = 2.5, label_dodge = .02
+ ) +
scale_shape_manual(values = c(2L, 3L, 0L, 5L)) +
ggtitle(
"LDA of Freestone glass measurements",
@@ -368,9 +370,11 @@ Examples
theme_bw() + theme_biplot() +
geom_rows_point() +
stat_rows_density_2d(elements = "score", alpha = .5, color = "#444444") +
- stat_cols_rule(aes(label = name), geom = "axis", color = "#888888", num = 8L,
- fun.offset = \(x) minabspp(x, p = .1),
- text_size = 2.5, text_dodge = .025) +
+ stat_cols_rule(
+ aes(label = name), geom = "axis", color = "#888888", num = 8L,
+ ref_elements = "active", fun.offset = \(x) minabspp(x, p = .1),
+ text_size = 2.5, text_dodge = .025
+ ) +
scale_shape_manual(values = c(16L, 17L, 15L, 18L)) +
ggtitle(
"LDA of Freestone glass measurements",