Answers for "how to get number of columns in matrix R"

R
1

how to get number of columns in matrix R

#Suppose x is a matrix
x <- matrix()

#Number of rows
nrow(x)
#Number of columns
ncol(x)
Posted by: Guest on November-11-2020

Code answers related to "how to get number of columns in matrix R"

Browse Popular Code Answers by Language