Professional Documents
Culture Documents
a) Assign different type of values to variables and display the type of variable. Assign
different types such as Double, Integer, Logical, Complex and Character and understand
the difference between each data type.
1.
c) Demonstrate generation of sequences and creation of vectors.
• Arithmetic operations
+, - , *, /, %%
• Logical operations
logical AND (&&) , logical OR (||) and logical NOT (!)
Demonstrate generation of sequences and creation of vectors.
&
Demonstrate Creation of Matrices
• # Matrices
mat <- matrix(1:9, nrow = 3, ncol = 3)
element_mat <- mat[2, 2] # Extract element in the second row and second column