Answers for "how to get number of columns in a table in 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
0

count number of columns in r

ncol(df)
Posted by: Guest on April-03-2021

Code answers related to "how to get number of columns in a table in r"

Browse Popular Code Answers by Language