22.6k views
4 votes
Which of the following statements is NOT true about lists in R?

a. A list cannot be stored as a variable
b. When we create a list, we need to use parentheses instead of brackets
c. The command for creating a list in R is c
d. Lists in R can either contain numbers or words

User CudoX
by
8.1k points

1 Answer

4 votes

Final answer:

The correct answer is b. When we create a list, we need to use parentheses instead of brackets.

Step-by-step explanation:

The correct answer is b. When we create a list, we need to use parentheses instead of brackets. In R, we use brackets, not parentheses, to create a list. For example, to create a list of numbers, we can use the following syntax: my_list <- list(1, 2, 3). Lists in R can contain a combination of different types of elements, including numbers, words, or even other lists. So statement d is true: lists in R can contain numbers or words.

User Dkatzel
by
6.8k points