# Creating matrices

# Simple way - using matrix()

x<-matrix(c(1,2,3,4),nrow=2,ncol=2)

# Display x

# As the number of rows defines the number of columns
# we can drop one of either nrow or ncol

y<-matrix(c(1,2,3,4), nrow=2)
z<-matrix(c(1,2,3,4), ncol=2)

# Display x and y

x
y

# Check to see if these are identical

identical(x,y)

