Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question in 3.7 #1719

Open
yulisong opened this issue Dec 24, 2021 · 0 comments
Open

Question in 3.7 #1719

yulisong opened this issue Dec 24, 2021 · 0 comments

Comments

@yulisong
Copy link

In this section, it's mentioned that To represent an empty vector (a vector of length zero) of arbitrary type. For example, if you use c() but don’t include any arguments, you get NULL. Below is what I understand, please correct me if I'm wrong.

If we use vector(length=0L), which is used to generate the vector, it returns a logical vector with length 0. And if we use is.null(vector()), the output is FALSE, which shows that the empty vector in R is not NULL.

c() can not only generate the atomic vector or the list. As noted in the R Documentation of c(), With no arguments the value is NULL. The result generated by c() is NULL. And we cannot say that because c() generates NULL, NULL is an empty vector.

Thank you in advance for anyone's suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant