1

Create a numeric vector with at least 6 numbers.
To create a vector you need the c() function.

2

Now, create a character vector with four distinct strings.
Strings or characters have to be enclosed by quotation marks ("" or '').

3

Let’s turn to more complex data structures. Create a matrix with two columns using the matrix() function based on the numeric vector you built in the first exercise.
You have to either define the nrow or ncol option to get the proper layout of the matrix.

4

Create a list that includes all of the objects you have created in the previous tasks in this set of exercises .
Just wrap all elements in the list() function

5

Extract the matrix from the list and convert it to a data frame using the as.data.frame() function .
List elements are accessed with [[]].

6

Add some column names (e.g., “first” and “second”) for the two columns of the data frame.
You can use the same function for setting/changing names as for viewing them.