R PROGRAMMING LAB
R PROGRAMMING LAB
1. Write a R program to take input from the user (name and age) and display the
values.
5.Write a R program to get the unique elements of a given string and unique
numbers of vector.
6.Write a R program to create three vectors a,b,c with 3 integers. Combine the
three vectors to become a 3×3 matrix where each column represents a vector.
Print the content of the matrix.
7.Write a R program to create a 5 x 4 matrix , 3 x 3 matrix with labels and fill the
matrix by rows and 2 × 2 matrix with labels and fill the matrix by columns.
8.Write a R program to combine three arrays so that the first row of the first
array is followed by the first row of the second array and then first row of the
third array.
13.Write a R program to create a data frame using two given vectors and display
the duplicated elements and unique rows of the said data frame.
14.Write a R program to save the information of a data frame in a file and display
the information of the file.
15.Write a R program to create a matrix from a list of given vectors.
21.Write a R program to list containing a vector, a matrix and a list and give
names to the elements in the list.
27.Write a R program to assign new names "a", "b" and "c" to the elements
of a given list.