Extract.onion {onion} | R Documentation

## Extract or Replace Parts of an onion

### Description

Extract or replace subsets of onions.

### Arguments

`x` | An onionic vector
`index` | elements to extract or replace
`value` | replacement value

### Details

These methods work as expected: an octonionic vector is a eight-row matrix and element selection/replacement operate, on a per-column basis, on objects coerced to class “matrix”.

### Value

Always returns an onion of the same class as `x`.

### Examples

    a <- octonion(Re=1,j=1:10)
    a[1:3]  <- Oil
    a[3:5]

    a[2:4] <- a[1]
    a[2:3] <- c(10,11)

[Package onion version 1.2-7 Index]