my_array = array(1:16,c(4,4)) my_array #All rows in 4th column my_array[,4] #2nd and 3rd rows in 3rd column my_array[2:3,3] #4th row 2nd column my_array[4,2] # to fetch 4 mid values my_array[2:3,2:3] # changing the data in array my_array[1,] = c(100,200,3,400) my_array my_array[2:3,2:4] = array(c(29,65,78,67,34,31),c(2,3)) my_array
To embed this project on your website, copy the following code and paste it into your website's HTML: