Skip to content

Commit

Permalink
Removed old recover_aug_rows() definition to resolve merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
jbgracey6 committed Feb 12, 2025
2 parents 38feb08 + ceac598 commit b56dba3
Show file tree
Hide file tree
Showing 346 changed files with 18,107 additions and 5,519 deletions.
18 changes: 15 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ordr
Title: A Tidyverse Extension for Ordinations and Biplots
Version: 0.1.1.0001
Version: 0.1.1.0002
Authors@R: c(
person("Jason Cory", "Brunson", email = "[email protected]",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3126-9494")),
Expand Down Expand Up @@ -32,6 +32,7 @@ Depends:
ggplot2
Imports:
rlang,
cli,
stringr,
tidyselect,
scales,
Expand All @@ -49,6 +50,7 @@ Suggests:
gridExtra,
MASS,
mlpack,
ddalpha,
knitr,
rmarkdown
License: GPL-3
Expand All @@ -62,6 +64,8 @@ Collate:
'aaa-.r'
'biplot-key.r'
'biplot.r'
'coord-rect.r'
'coord-scaffold.r'
'data.r'
'dplyr-verbs.r'
'utils.r'
Expand All @@ -73,9 +77,12 @@ Collate:
'fun-lra.r'
'fun-wrap.r'
'geom-axis.r'
'geom-bagplot.r'
'geom-interpolation.r'
'geom-intervals.r'
'geom-isoline.r'
'geom-origin.r'
'geom-rule.r'
'geom-text-radiate.r'
'geom-utils.r'
'geom-vector.r'
Expand All @@ -100,13 +107,18 @@ Collate:
'ord-tidiers.r'
'ordinate.r'
'ordr.r'
'stat-center.r'
'stat-chull.r'
'stat-depth.r'
'stat-bagplot.r'
'stat-center.r'
'stat-cone.r'
'stat-matrix.r'
'stat-referent.r'
'stat-projection.r'
'stat-rule.r'
'stat-scale.r'
'stat-spantree.r'
'themes.r'
'theme-scaffold.r'
'zzz-biplot-geoms.r'
'zzz-biplot-stats.r'
'zzz.r'
Expand Down
79 changes: 79 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ S3method(biplot,tbl_ord)
S3method(dim,tbl_ord)
S3method(format,tbl_ord)
S3method(fortify,tbl_ord)
S3method(ggplot_add,LayerRef)
S3method(glance,tbl_ord)
S3method(lda_ord,data.frame)
S3method(lda_ord,default)
Expand Down Expand Up @@ -182,33 +183,61 @@ S3method(screeplot,tbl_ord)
S3method(stats::model.frame,lda_ord)
S3method(tidy,tbl_ord)
export("%>%")
export(CoordRect)
export(CoordScaffold)
export(GeomAxis)
export(GeomBagplot)
export(GeomInterpolation)
export(GeomIsoline)
export(GeomLineranges)
export(GeomOrigin)
export(GeomPointranges)
export(GeomRule)
export(GeomTextRadiate)
export(GeomUnitCircle)
export(GeomVector)
export(StatBagplot)
export(StatCenter)
export(StatChull)
export(StatCols)
export(StatColsBagplot)
export(StatColsCenter)
export(StatColsChull)
export(StatColsCone)
export(StatColsDensity2d)
export(StatColsDensity2dFilled)
export(StatColsDepth)
export(StatColsDepthFilled)
export(StatColsEllipse)
export(StatColsPeel)
export(StatColsProjection)
export(StatColsRule)
export(StatColsScale)
export(StatColsSpantree)
export(StatColsStar)
export(StatCone)
export(StatDepth)
export(StatDepthFilled)
export(StatPeel)
export(StatProjection)
export(StatReferent)
export(StatRows)
export(StatRowsBagplot)
export(StatRowsCenter)
export(StatRowsChull)
export(StatRowsCone)
export(StatRowsDensity2d)
export(StatRowsDensity2dFilled)
export(StatRowsDepth)
export(StatRowsDepthFilled)
export(StatRowsEllipse)
export(StatRowsPeel)
export(StatRowsProjection)
export(StatRowsRule)
export(StatRowsScale)
export(StatRowsSpantree)
export(StatRowsStar)
export(StatRule)
export(StatScale)
export(StatSpantree)
export(StatStar)
Expand All @@ -219,12 +248,21 @@ export(cbind_cols)
export(cbind_rows)
export(cmdscale_ord)
export(confer_inertia)
export(coord_rect)
export(coord_scaffold)
export(coord_square)
export(draw_key_crosslines)
export(draw_key_crosspoint)
export(draw_key_line)
export(eigen_ord)
export(geom_axis)
export(geom_bagplot)
export(geom_cols_axis)
export(geom_cols_bagplot)
export(geom_cols_contour)
export(geom_cols_density_2d)
export(geom_cols_density_2d_filled)
export(geom_cols_interpolation)
export(geom_cols_isoline)
export(geom_cols_label)
export(geom_cols_label_repel)
Expand All @@ -233,16 +271,23 @@ export(geom_cols_path)
export(geom_cols_point)
export(geom_cols_pointranges)
export(geom_cols_polygon)
export(geom_cols_rule)
export(geom_cols_text)
export(geom_cols_text_radiate)
export(geom_cols_text_repel)
export(geom_cols_vector)
export(geom_interpolation)
export(geom_isoline)
export(geom_label_repel)
export(geom_lineranges)
export(geom_origin)
export(geom_pointranges)
export(geom_rows_axis)
export(geom_rows_bagplot)
export(geom_rows_contour)
export(geom_rows_density_2d)
export(geom_rows_density_2d_filled)
export(geom_rows_interpolation)
export(geom_rows_isoline)
export(geom_rows_label)
export(geom_rows_label_repel)
Expand All @@ -251,10 +296,12 @@ export(geom_rows_path)
export(geom_rows_point)
export(geom_rows_pointranges)
export(geom_rows_polygon)
export(geom_rows_rule)
export(geom_rows_text)
export(geom_rows_text_radiate)
export(geom_rows_text_repel)
export(geom_rows_vector)
export(geom_rule)
export(geom_text_radiate)
export(geom_text_repel)
export(geom_unit_circle)
Expand All @@ -267,13 +314,17 @@ export(get_negation)
export(get_rows)
export(ggbiplot)
export(glance)
export(is.sync)
export(is.tbl_ord)
export(is_tbl_ord)
export(lda_ord)
export(left_join_cols)
export(left_join_rows)
export(lra)
export(make_tbl_ord)
export(maxpp)
export(minabspp)
export(minpp)
export(mutate_cols)
export(mutate_rows)
export(negate_ord)
Expand All @@ -298,30 +349,55 @@ export(revert_conference)
export(revert_negation)
export(select_cols)
export(select_rows)
export(stat_bagplot)
export(stat_center)
export(stat_chull)
export(stat_cols)
export(stat_cols_bagplot)
export(stat_cols_center)
export(stat_cols_chull)
export(stat_cols_cone)
export(stat_cols_density_2d)
export(stat_cols_density_2d_filled)
export(stat_cols_depth)
export(stat_cols_depth_filled)
export(stat_cols_ellipse)
export(stat_cols_peel)
export(stat_cols_projection)
export(stat_cols_rule)
export(stat_cols_scale)
export(stat_cols_spantree)
export(stat_cols_star)
export(stat_cone)
export(stat_depth)
export(stat_depth_filled)
export(stat_peel)
export(stat_projection)
export(stat_referent)
export(stat_rows)
export(stat_rows_bagplot)
export(stat_rows_center)
export(stat_rows_chull)
export(stat_rows_cone)
export(stat_rows_density_2d)
export(stat_rows_density_2d_filled)
export(stat_rows_depth)
export(stat_rows_depth_filled)
export(stat_rows_ellipse)
export(stat_rows_peel)
export(stat_rows_projection)
export(stat_rows_rule)
export(stat_rows_scale)
export(stat_rows_spantree)
export(stat_rows_star)
export(stat_rule)
export(stat_scale)
export(stat_spantree)
export(stat_star)
export(svd_ord)
export(sync)
export(theme_biplot)
export(theme_scaffold)
export(tidy)
export(transmute_cols)
export(transmute_rows)
Expand All @@ -342,6 +418,8 @@ importFrom(ggrepel,GeomLabelRepel)
importFrom(ggrepel,GeomTextRepel)
importFrom(ggrepel,geom_label_repel)
importFrom(ggrepel,geom_text_repel)
importFrom(ggrepel,position_nudge_repel)
importFrom(grDevices,chull)
importFrom(graphics,plot)
importFrom(magrittr,"%>%")
importFrom(rlang,"%||%")
Expand All @@ -353,6 +431,7 @@ importFrom(rlang,expr)
importFrom(rlang,is_empty)
importFrom(rlang,is_formula)
importFrom(rlang,is_function)
importFrom(rlang,list2)
importFrom(rlang,set_names)
importFrom(stats,.checkMFClasses)
importFrom(stats,.getXlevels)
Expand Down
87 changes: 84 additions & 3 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,94 @@
# next version

## debugged axis geom
## infrastructure and standards

The 'axis' and 'isoline' geoms hit trouble when one or more points lay at the origin (`x^2 + y^2 == 0`). These cases have now been removed in `setup_data()`.
### wrapper defaults

Previously, `lda_ord()` mimicked `MASS::lda()` in defaulting the retrieval parameters `ret.x` and `ret.grouping` to `FALSE`.
Because they are so important to analysis and especially to biplots, they now default to `TRUE`.

### unit tests

Unit tests have been written for all ggproto shortcuts.

## upgrades to the biplot chassis

## axis harmonizers
### axis harmonizers

Multiple harmonizers are now available for scaling secondary axes. That recommended by Gower, Gardner--Lubbe, and Le Roux (2011) is the default, but the user can still specify a numeric scale instead.

### GDA-geared coordinate systems

Two new coordinate systems provide control over the aspect ratio of the plotting window without compromising that of the (artificial) coordinate axes:
`GeomRect` (alias `GeomSquare`) extends `GeomFixed` with an `window_ratio` parameter for the plotting window, while `GeomBiplot` removes the `ratio` parameter and forces the coordinate axes to have aspect ratio 1.

### scaffold theme

The 'biplot' theme has been renamed 'scaffold', with an alias for backward compatibility.

### standardized and restrictive elements parameter (breaking change)

The `elements` parameter is now standardized across all statistical transformations (through the code generation process) and accepts more restrictive options:
The value is argument-matched to `"active"`, `"score"`, or `"structure"`; these options may expand as additional supplementary elements are introduced.
Moreover, the former default `"all"` is no longer accepted, which forecloses the trick of passing the element type to an aesthetic, e.g. `size = .element == "active"`, as had been used in several examples.

## up( or down)grades to existing plot layers

### combined vector and radiating text geom (breaking change)

The 'vector' and 'text_radiate' geoms have been combined.
The shortcut `geom_text_radiate()` is deprecated, and `geom_vector()` generates radiating labels by default.

### debugged axis geom

The 'axis' and 'isoline' geoms hit trouble when one or more points lay at the origin (`x^2 + y^2 == 0`). These cases have now been removed in `setup_data()`.

### reconciliation of summary functions

The 'center' and 'star' stats now follow the 'summary' stat convention of using `fun`, so `fun.center` is deprecated.
Additionally, `fun.ord` accepts a function that summarizes the columns of a matrix, which accommodates summaries like the depth median that do not decompose along orthogonal axes.

### revamped handling of secondary aesthetics (breaking change)

Previously, underscore-separated parameters like `label_colour` were used to specify secondary aesthetics, i.e. aesthetics for graphical objects other than those considered "primary" for the layer.
Their behavior has been debugged by mimicking the use of period-separated parameters like `label.colour` in **ggplot2** v3.5.1, except for the new bagplot geom, for which their behavior is based on that of `geom_boxplot()` in the current development version of {ggplot2}.
This induces some breaking changes due to the renaming of most, and the removal of some, such parameters.

### deprecation of scale stat

The simple and experimental `StatScale` has been deprecated.

## new plot layers

### addition geom

A new 'interpolation' geometric element layer renders either of two methods of vector addition to interpolate the position---on the existing ordination and its biplot---of a new row or column of the original data matrix.

### referential stats

A new statistical transformation serves to parent specific "referential stats", meaning those that depend on non-inherited (in this setting, positional) data to transform the inherited data. The reference data are passed to the new `referent` parameter. The new stat is coupled with an additional `LayerRef` class that enables `ggplot_add()` to pass the inherited positional aesthetics to `$setup_params()`. Biplot-specific `stat_*_*()` shortcuts accept additional argument types to `referent` that result in the opposite matrix factor being used as reference data.

### projection stat

The 'projection' referential stat prepares segment endpoints between `x,y` positions and their projections on axes defined by the reference data. It is a natural graphical element for predictive biplots of ordination models of continuous data.

### rule stat

A new 'rule' statistical transformation computes additional position aesthetics that the 'axis' geom uses to limit and offset axes. The stat is referential and expects a set of functions that compute limits `lower` and `upper` along the axes and `yintercept` and `xintercept` associated with offset axes. The 'axis' geom preprocesses these aesthetics to rule endpoints `xmin,ymin,xmax,ymax` and offset vectors `xend,yend` to force the plotting window to contain the limited axis segments or, if the axes remain lines, the offsets where they are centered.

### peel stat

A new 'peel' statistical transformation computes nested convex hulls containing specified fractions of data.

### depth stat

A new 'depth' statistical transformation estimates depth across a grid and is paired with `GeomContour` to produce depth contours, which can be used to plot alpha bags.

### adapted density stat & geom

Aided by element standardization, the classic `density_2d` statistical transformation and geometric construction are adapted to biplots.
Currently, source code generation does not respect fixed parameters passed to `layer()` by the `stat_*()` and `geom_*()` shortcuts; as a consequence, `contour = TRUE` must be manually passed to `geom_*_density_2d()`.

# ordr 0.1.1

## `linewidth` aesthetic (breaking change)
Expand Down
Loading

0 comments on commit b56dba3

Please sign in to comment.