List in R Programming

DATA TYPE: Graphical Representation of Data Types in R is shown as below: LIST: An ordered collection of objects. List is Single Dimensional. CREATING A LIST: Let us create list "L1" with different vector data type L1<-list(1,c(1,2,3),'a',2+3i,TRUE) print(L1) [[1]] [1] 1 [[2]] [1] 1 2 3 [[3]] [1] "a" [[4]] [1] 2+3i [[5]] [1] TRUE NAMING LIST: We can name the elements in the list. Let us create a list "Stud_data" Stud_data<-list(c("Anu","Abi"),c(100,95),list("Maths")) print(Stud_data) [[1]] [1] "Anu" "Abi" [[2]] [1] 100 95 [[3]] [[3]][[1]] [1] "Maths" names(Stud_data)<- c("Student Name", "Marks Obtained", "Subject") print(Stud_data) $`Student Name` [1] "Anu" "Abi" $`Marks Obtained` [1] 100 95 $Subject $Subject[[1]] [1] "Maths" ACCESSING LIST: We can access the list using the index of the element or using the name. Let...