Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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

Examples

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

ff

Memory-Efficient Storage of Large Data on Disk and Fast Access Functions

v4.0.4
GPL-2 | GPL-3 | file LICENSE
Authors
Daniel Adler [aut], Christian Gläser [aut], Oleg Nenadic [aut], Jens Oehlschlägel [aut, cre], Martijn Schuemie [aut], Walter Zucchini [aut]
Initial release
2020-10-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.