CoDa_seq {CoDaImpact} | R Documentation |

## A sequence connecting two points in a simplex

### Description

A sequence connecting two points in a simplex

### Usage

```
CoDa_seq(comp_from, comp_to, n_steps = 100, add_opposite = FALSE)
```

### Arguments

`comp_from` |
A numeric vector, representing the initial compositions |

`comp_to` |
A numeric vector, representing the final compositions. |

`n_steps` |
An integer, indicating the number of steps used to go from comp_from to comp_to |

`add_opposite` |
A logical, if |

### Details

The sequence is evenly spaced and corresponds to a straight line in the simplex geometry. If no end point is provided the line will connect the initial point with the first summit of the simplex. Since exact zeros are not handled by the ilr they are replaced by a small constant.

### Value

A data.frame frame where each row corresponds to one compositional vector

### Author(s)

Lukas Dargel

### See Also

simplex_increment

### Examples

```
# path to the first summit of the simplex
start_comp <- c(A =.4,B = .35, C= .25)
compositions::plot.acomp(CoDa_seq(start_comp))
compositions::plot.acomp(CoDa_seq(start_comp, add_opposite = TRUE))
# path to an edge of the simplex
end_comp <- c(0,.8,.2)
compositions::plot.acomp(CoDa_seq(start_comp, end_comp))
compositions::plot.acomp(CoDa_seq(start_comp, end_comp,add_opposite = TRUE))
```

[Package

*CoDaImpact*version 0.1.0 Index]