List in R
A
list is an R-object which can contain many different types of elements inside
it like vectors, functions and even another list inside it. Lists are sometimes
called recursive vectors, because a list can contain other lists. This makes
them fundamentally different from atomic vectors.
Command::
x <- list(10, "ax", TRUE,
1+4i)
Print::
print(x)
Output ::
[[1]]
[1]
10
[[2]]
[1]
"ax"
[[3]]
[1]
TRUE
[[4]]
[1]
1+4i
#Length
of List
Command::
length(x)
[1]
4
List in R
Reviewed by Rupesh
on
23:58
Rating:
No comments: