R: Create vector of virtual mode

vector.vmode {ff} | R Documentation

## Create vector of virtual mode

### Description

`vector.vmode` creates a vector of a given vmode and length

### Usage

    vector.vmode(vmode = "logical", length = 0)
    boolean(length = 0)
    quad(length = 0)
    nibble(length = 0)
    byte(length = 0)
    ubyte(length = 0)
    short(length = 0)
    ushort(length = 0)

### Arguments

`vmode` | virtual mode
`length` | desired length

### Details

Function `vector.vmode` creates the vector in one of the usual `storage.modes` (see `.rammode`) but flags them with an additional attribute 'vmode' if necessary. The creators can also be used directly:

`boolean` | 1 bit logical without NA
`logical` | 2 bit logical with NA
`quad` | 2 bit unsigned integer without NA
`nibble` | 4 bit unsigned integer without NA
`byte` | 8 bit signed integer with NA
`ubyte` | 8 bit unsigned integer without NA
`short` | 16 bit signed integer with NA
`ushort` | 16 bit unsigned integer without NA
`integer` | 32 bit signed integer with NA
`single` | 32 bit float
`double` | 64 bit float
`complex` | 2x64 bit float
`raw` | 8 bit unsigned char
`character` | character

### Value

a vector of the desired vmode initialized with 0

### Author(s)

Jens Oehlschlägel

### See Also

`as.vmode`, `vector`

### Examples

      vector.vmode("byte",12)
      vector.vmode("double",12)
      byte(12)
      double(12)

[Package ff version 2.2-13 Index]