Page 205 - Data Science class 11
P. 205
Run to see the following in the console panel:
6.2.5 raw type
Raw data, also known as primary data, are data (e.g., numbers, instrument readings, figures, etc.) collected from a
source. The data are written as a stream of bytes. There are no gaps or markers that say where one value ends and
another begins. Raw creates a raw vector of the specified length. Each element of the vector is equal to 0. Raw vectors
are used to store fixed-length sequences of bytes.
Vector is an array of data elements where all the elements belong to the same data type.
The raw data type holds raw bytes, so it is a very unusual data type. For instance, you could transform a character
object or an integer numeric value into a raw object with the charToRaw and intToBits functions, respectively.
A raw vector is used to represent a "raw" sequence of bytes. Each byte has a value between 0 and 255. Raw vectors
are printed using hexadecimal (base 16) notation, so the (decimal) value code10 is printed as 0a. The hexadecimal
number system has got 16 symbols, viz. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and then A, B, C, D, E, F. Each character in the ASCII
(American Standard Code for Information Interchange) table is assigned a hexadecimal (base 16) number as given in
the following abridged ASCII table.
Programming with R 203

