Biomedical Engineering Theory And Practice/R Language

Data Types
R has a various objects for holding data, including scalars, vectors, matrices, arrays, data frames, and lists.

Scalar and Constant
"Scalar" generally means "one-dimensional"vector. Constants only have one value ever. You can constants is similar to zero-dimensional values (a single point).
 * Scalar
 * Constant

Vector
Vectors are one-dimensional arrays that can hold numeric data, character data, or logical data. The combine function c is used to form the vector. Here are examples of each type of vector:

Matrix
A matrix is a two-dimensional array where each element has the same mode (numeric, character, or logical). Matrices are created with the "matrix" function. The general format is as follows:

Arithmetic Operators
The arithmetic operators and their examples which are used in R programming are listed in the table below.

Relational Operators

 * TRUE=1,FALSE=0

Logical Operators
> z1<-xor(x,y) > z1 [1] FALSE FALSE FALSE