Lab2
R Programmng Basic Commands Indexing Data using [] A=matrix(1:16,4,4) A ## [,1] [,2] [,3] [,4] ## [1,] 1 5 9 13 ## [2,] 2 6 10 14 ## [3,] 3 7 11 15 ## [4,] 4 8 12 16 A[2,3] ## [1] 10 A[c(1,3),c(2,4)] ## [,1] [,2] ## [1,] 5 13 ## [2,] 7 15 A[1:3,2:4] ## [,1] [,2] [,3] ## [1,] 5 9 13 ## [2,] 6 10 14 ## [3,] 7 11 15 A[1:2,] ## [,1] [,2] [,3] [,4] ## [1,] 1 5 9 13 ## [2,] 2 6 10 14 A[,1:2] ## [,1] [,2] ## [1,] 1 5 ## [2,] 2 6 ## [3,] 3 7 ## [4,] 4 8 A[1,] ## [1] 1 5 9 13 A[-c(1,3),] ## [,1] [,2] [,3] [,4] ## [1,] 2 6 10 14 ## [2,] 4 8 12 16 A[-c(1,3),-c(1,3,4)] ## [1] 6 8 dim(A) ## [1] 4 4 Loading Data from GitHub Auto=read.