#R arrays are the methode to store the data in multiple dimension
# as vector is a type of methode to store the data in single dimenison.

#array_name[row,column,matrix]

example_array = array(data=c(10,14,15,20,21,24,23,25), dim=c(2,4,1))

example_array[1,3,1]
example_array[,,1]

my_vactor = 1:8

# can create array without specifying the data and dim it will take by position
this_array = array(my_vactor,c(2,2,2))
my_array = array(data=my_vactor,dim=c(2,2))

#It defines that it could be matrix or array
class(my_array)

# here in this_array it is defined that there 1 matrix and it is array
this_array
class(this_array)

# typeof function will tell you what datatype of element has been stored in array
typeof(my_array)

# to check the dimension of array
dim(this_array)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: