SVAttribute-class {geva} | R Documentation

## Summary-Variation Attribute Field

### Description

This S4 class stores two character slots representing attribute fields for summary and variation. The `SVAttribute` class is abstract and must be instantiated as `SVChrAttribute` (for `character`), `SVNumAttribute` (for `numeric`), or `SVIntAttribute` (for `integer`).

### Arguments

`S` | the summary value
`V` | the variation value

### Value

A `SVAttribute` object

### Slots

`S`

  either `character` or `numeric` or `integer` of length one

`V`

  either `character` or `numeric` or `integer` of length one

### Methods

Alternative accessors

`summary(object, ...)`

  Returns the contents from `S` slot

`sv(object)`

  Returns the contents as a named vector

`variation(object, ...)`

  Returns the contents from `S` slot

Constructors

`sv.data(object)`

  For internal use. Returns the equivalent object

`svattr(S, V)`

  Creates a new `SVAttribute`

Conversion and coercion

`as.character(x, ...)`

  Converts this object to `character`

`as.vector(x, ...)`

  Converts this object to `vector`

Dimension accessors

`dim(x)`

  For internal use, always returns `NULL`

`names(x)`

  Returns the slot names (always `c('S', 'V')`)

Properties

`x$name <- value`

  Queries the vector contents (equivalent to the indexer). Only accepts `$S` and `$V`

`x[i, j, ..., drop=TRUE]`

  Indexer to access the vector values. Only accepts `'S'` or `'V'` as `i` arguments

### Note

The slots `S` and `V` must be of the same class (either `character`, `numeric`, or `integer`).

[Package geva version 1.2.0 Index]