scale {compositions} | R Documentation

## Normalizing datasets by centering and scaling

### Description

The dataset is standardized by optional scaling and centering.

### Usage

    ## S3 method for class 'acomp':
    scale(x,center=TRUE, scale=TRUE)
    ## S3 method for class 'rcomp':
    scale(x,center=TRUE, scale=TRUE)
    ## S3 method for class 'aplus':
    scale(x,center=TRUE, scale=TRUE)
    ## S3 method for class 'rplus':
    scale(x,center=TRUE, scale=TRUE)
    ## S3 method for class 'rmult':
    scale(x,center=TRUE, scale=TRUE)

### Arguments

`x` | a dataset or a single vector of some type
`center` | logical value
`scale` | logical value

### Details

scaling is defined in different ways for the different data types. It is always performed as an operation in the enclosing vector space. In all cases an independent scaling of the different coordinates is not always appropriate. This is only done for rplus and rmult geometries. The other three geometries are treated with a global scaling, keeping the relative variations of every part/amount.

### Value

a vector or data matrix, as `x` and with the same class, but acordingly transformed.

### Author(s)

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

### See Also

`split{base}`

### Examples

      data(SimulatedAmounts)
      plot(scale(acomp(sa.groups)))
      ## Not run:
    plot(scale(rcomp(sa.groups)))
    ## End(Not run)
      plot(scale(aplus(sa.groups)))
      ## Not run:
    plot(scale(rplus(sa.groups)))
    ## End(Not run)
      plot(scale(rmult(sa.groups)))

[Package compositions version 0.91-6 Index]