R Programming List: Exercises, Practice, Solution
R Programming List [21 exercises with solution]
[An editor is available at the bottom of the page to write and execute the scripts. Go to the editor]
1. Write a R program to create a list containing strings, numbers, vectors and a logical values.
Click me to see the sample solution
2. Write a R program to list containing a vector, a matrix and a list and give names to the elements in the list.
Click me to see the sample solution
3. Write a R program to create a list containing a vector, a matrix and a list and give names to the elements in the list. Access the first and second element of the list.
Click me to see the sample solution
4. Write a R program to create a list containing a vector, a matrix and a list and add element at the end of the list.
Click me to see the sample solution
5. Write a R program to select second element of a given nested list.
Click me to see the sample solution
6. Write a R program to create a list containing a vector, a matrix and a list and remove the second element.
Click me to see the sample solution
7. Write a R program to create a list containing a vector, a matrix and a list and update the last element.
Click me to see the sample solution
8. Write a R program to merge two given lists into one list.
Click me to see the sample solution
9. Write a R program to convert a given list to vector.
Click me to see the sample solution
10. Write a R program to create a list of dataframes and access each of those dataframes from the list.
Click me to see the sample solution
11. Write a R program to count number of objects in a given list.
Click me to see the sample solution
12. Write a R program to convert a given dataframe to a list by rows.
Click me to see the sample solution
13. Write a R program to convert a given matrix to a list.
Click me to see the sample solution
14. Write a R program to assign NULL to a given list element.
Click me to see the sample solution
15. Write a R program to create a list named s containing sequence of 15 capital letters, starting from ‘E’.
Click me to see the sample solution
16. Write a R program to Add 10 to each element of the first vector in a given list
Click me to see the sample solution
17. Write a R program to extract all elements except the third element of the first vector of a given list.
Click me to see the sample solution
18. Write a R program to add a new item g4 = "Python" to a given list.
Click me to see the sample solution
19. Write a R program to assign new names "a", "b" and "c" to the elements of a given list.
Click me to see the sample solution
20. Write a R program to get the length of the first two vectors of a given list.
Click me to see the sample solution
21. Write a R program to find all elements of a given list that are not in another given list.
Click me to see the sample solution
R Programming Code Editor:
More to Come !
Do not submit any solution of the above exercises at here, if you want to contribute go to the appropriate exercise page.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/r-programming-exercises/list/index.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics