Create Empty List in R with Length of Zero

Here we are going to create an empty list with length 0 by using list() function.

Syntax:

data=list()

Example:

R




# create empty list
data = list()
 
print(data)
 
# display length
print(length(data))


Output:

list()
[1] 0

How to Create Empty List in R?

In this article, we will discuss how to create an empty list in R Programming Language.

Similar Reads

Create Empty List in R with Length of Zero

Here we are going to create an empty list with length 0 by using list() function....

Create Empty List in R with Specific Length

...