countsone-valuesone {dembase} | R Documentation

## Create one-dimensional object of class "Counts" or "Values"

### Description

Convenience functions for creating one-dimensions objects of class `"Counts"` or `"Values"`.

### Usage

    CountsOne(values, labels, name, dimtype = NULL, dimscale = NULL)

    ValuesOne(values, labels, name, dimtype = NULL, dimscale = NULL)

### Arguments

`values` | Numeric vector.
`labels` | Character vector of labels.
`name` | Name of dimension.
`dimtype` | `dimtype` of dimension. Optional.
`dimscale` | `dimscale` of dimension. Optional.

### Details

When creating one-dimensional `"Counts"` or `"Counts"` objects, using `CountsOne` and `ValuesOne` is slightly easier than using the standard generator functions `Counts` and `Values`.

If `values` is shorter than `labels`, it is recycled.

### Value

Object of class `"Counts"` or `"Counts"`.

### See Also

`Counts` and `Values` are used to created `"Counts"` or `"Counts"` of any dimension.

### Examples

    CountsOne(values = c(-1, 1), labels = c("Female", "Male"), name = "sex")

    ValuesOne(values = rnorm(10), labels = 0:9, name = "age")

    ValuesOne(values = rnorm(3), labels = 1:3, name = "time", dimtype = "state")

    ValuesOne(values = rnorm(10), labels = 0:9, name = "age", dimscale = "Points")

[Package dembase version 0.0.0.119 Index]