What is attribute drop signify in R

r

#1

I was studying about subseeting of a matrix in R and I came across a attribute drop

x<-matrix(1:6,2,3)
x
[,1] [,2] [,3]
[1,] 1 3 5
[2,] 2 4 6

x[1,2,drop=F]
[,1]
[1,] 3


#2

When drop=T, a vector will be returned and when drop=F, the matrix structure will be retained.

x[,3, drop=F]
[,1]
[1,] 5
[2,] 6

x[,3, drop=T]
[1] 5 6

Hope this helps