ff (version 4.0.7)

vector.vmode: 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)

Value

a vector of the desired vmode initialized with 0

Arguments

vmode

virtual mode

length

desired length

Author

Jens Oehlschlägel

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:

boolean1 bit logical without NA
logical2 bit logical with NA
quad2 bit unsigned integer without NA
nibble4 bit unsigned integer without NA
byte8 bit signed integer with NA
ubyte8 bit unsigned integer without NA
short16 bit signed integer with NA
ushort16 bit unsigned integer without NA
integer32 bit signed integer with NA
single32 bit float
double64 bit float
complex2x64 bit float
raw8 bit unsigned char
charactercharacter

See Also

as.vmode, vector

Examples

Run this code
  vector.vmode("byte",12)
  vector.vmode("double",12)
  byte(12)
  double(12)

Run the code above in your browser using DataCamp Workspace