-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addition/interpolation, projection/prediction, and limiting/offsetting rule layers #64
Conversation
All tests pass and examples work as expected. However, Importantly, the behavior of |
I almost forgot to make library(devtools)
#> Loading required package: usethis
load_all("~/Documents/software/ordr/")
#> ℹ Loading ordr
#> Loading required package: ggplot2
iris_pca <- ordinate(iris, cols = 1:4, model = prcomp)
bench::mark(
`1` = {
p <- ggbiplot(iris_pca, aes(color = Species, label = name)) +
stat_rows_projection()
layer_data(p)
},
`2` = {
p <- ggbiplot(iris_pca, aes(color = Species, label = name)) +
stat_rows_projection2()
layer_data(p)
},
check = FALSE
)
#> # A tibble: 2 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 1 32.7ms 33.3ms 29.7 9.61MB 7.42
#> 2 2 27.6ms 28.4ms 35.0 2.25MB 10.8
bench::mark(
`1` = {
p <- ggbiplot(iris_pca, ord_aes(iris_pca, color = Species, label = name)) +
stat_rows_projection()
layer_data(p)
},
`2` = {
p <- ggbiplot(iris_pca, ord_aes(iris_pca, color = Species, label = name)) +
stat_rows_projection2()
layer_data(p)
},
check = FALSE
)
#> # A tibble: 2 × 6
#> expression min median `itr/sec` mem_alloc `gc/sec`
#> <bch:expr> <bch:tm> <bch:tm> <dbl> <bch:byt> <dbl>
#> 1 1 33.6ms 35ms 28.1 1.64MB 12.5
#> 2 2 29.3ms 29.9ms 33.0 1.25MB 7.07 Created on 2024-12-25 with reprex v2.1.1 |
This PR addresses half of #4, which should remain open. It is feature-complete and (i believe) only unit tests remain to be written.