Complete the code to create a list with numbers 1 to 5.
my_list <- [1](1, 2, 3, 4, 5)
The c() function combines values into a vector or list in R.
Complete the code to create a list with elements 'apple', 'banana', and 'cherry'.
fruits <- [1]("apple", "banana", "cherry")
The c() function combines character elements into a vector.
Fix the error in the code to create a list with numbers 1, 2, and 3.
numbers <- [1](1, 2, 3)
The elements must be separated by commas inside c().
Fill both blanks to create a list of numbers from 1 to 5 and check its length.
my_list <- [1](1, 2, 3, 4, 5) length_of_list <- [2](my_list)
list() instead of c() changes the data structure.size() is not a valid function in R.c() creates the vector and length() returns its length.
Fill all three blanks to create a list of fruits, access the second fruit, and get the total count.
fruits <- [1]("apple", "banana", "cherry") second_fruit <- fruits[[2]] total_fruits <- [3](fruits)
list() instead of c() changes the data type.size() instead of length().c() creates the vector, indexing with [2] gets the second fruit, and length() returns the count.
