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.























# Empty
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: 5

No comments:

All Rights Reserved by Technology from Developers Eye © 2014 - 2015
Powered By Blogger, Designed by Aadics
Disclaimers:: The information provided within this blogsite is for general informational purposes only. While we try to keep the information up-to-date and correct, there are no representations or warranties, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the information, products, services, or related graphics contained in this blogsite for any purpose.The author does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause.

Contact Form

Name

Email *

Message *

Powered by Blogger.